Hello dear, can you please help me in this assignment?
- What is the output of the following code snippet :
int i = 1;
while (i != 8)
System.out.println("" + i);
i = i + 2;
- Convert the following for loop into a while loop.
int sum = 0;
for (int i = 8; i > 0; i--)
sum = sum + i
- creat a while loop that computes the sum of all integers from 1 to 15.
1)The output is : 1,2,5,7 because it displays the value of i beginning from i =1... View the full answer