Write the output from the Systemoutprintln for the following
Write the output from the System.out.println for the following code.
int sum= 0, i, j;
i = 1;
while(i * i <=16)
{
j = i;
while(j * j <=64)
{
sum = i + j;
System.out.println(\"I =\" + i +\" J =\" + j + \" sum = \" + sum);
j = j * 2;
}
i++;
}
Note: this is java programming
Solution
Answer:
Below is the output for above program whie running
I =1 J =1 sum = 2
I =1 J =2 sum = 3
I =1 J =4 sum = 5
I =1 J =8 sum = 9
I =2 J =2 sum = 4
I =2 J =4 sum = 6
I =2 J =8 sum = 10
I =3 J =3 sum = 6
I =3 J =6 sum = 9
I =4 J =4 sum = 8
I =4 J =8 sum = 12
