int i=1,j=0,n=0;
while(i<4)
{
for(j=11;j<=i;j++)
{ n+=i;}
i = i + 1;
}
System.out.println(j);
System.out.println(n);
int i =3,n=0;
while(i<4)
{
n++;
i--;
}
System.out.println(n);
System.out.println(i);
int j=1,s=0;
while(j<10)
{
System.out.print(j+"+");
s =s +j;
j = j + j%3;
}
System.out.println("="+s);
int m =0;
while(m>0)
{
if(m<10)
{ break; }
m = m-10;
}
System.out.println(m);
int f =1,i =2;
while(++i<5)
{
f*=i;
}
System.out.println(f);
int a =0;
while(a<=13)
{
if(a%2 == 2)
{
System.out.println("red color");
}
else
{
System.out.println("Blue Color");
}
a = a + 1;
}
int i,n;
n = 0;i =1;
do
{
n++;
i++;
System.out.println(i);
}while(i<=5);
Q.1int t , s; s = 6; t = ( 8 * s++ )%7; System.out.println(t); Ans: 6Q.2int a=6, b =5; a++; --b; b++; a--; System.out.println(a); System.out.println(b); Ans: value of a is 6 Ans: value of b is 5Q.3int val = 500, n =100, res; res = n + val >1750 ? 400 : 200; System.out.println(res); Ans: 200
Q.1 Predict the outputs of the following :-