Computer Science, asked by NEOKILLER2721P, 5 months ago

Convert the following to while loop and also find out the output for(int i=1,j=9 ; i<j ; i++ , j-=i , System.out.println(i+j));​

Answers

Answered by Oreki
2

Output:

10

9

7

Converting to while loop:

   int i = 1, j = 9;

   while (i < j) {

       System.out.print(i + j);

       i++;

       j -= i;

    }

Answered by Anonymous
1

Answer:

\fbox\pink{HAPPY MAKAR SANKRANTI}

Similar questions