Convert the following do…while loop to for loop:

ICSE Class 10 Computer Applications PYQ · 2023 Paper · Section A

2(iii)1 Mark · 2023 · Section A · 2023 Paper

Convert the following do…while loop to for loop:

int x = 10;
do
{
x––;
System.out.print(x);
}while (x>=1);	
Show SolutionHide Solution↓
for(int x = 9; x >= 0; x--)
{
    System.out.print(x);
}
← Previous questionNext question →

Browse the free Computer Applications sample bank