Computer Applications

Convert the following do…while loop to for loop:

int x = 10;
do
{
x––;
System.out.print(x);
}while (x>=1);	

Java Iterative Stmts

ICSE 2023

79 Likes

Answer

for(int x = 9; x >= 0; x--)
{
    System.out.print(x);
}

Answered By

49 Likes


Related Questions