New course! Every coder should learn Generative AI!
Try a free lesson0
Use the do while loop to print i as long as i is less than 6.
2 Answers
+ 1
i = 9;
while(i>=6) {
// your code
i -= 1;
}
+ 1
int i = 1;
do{
System.out.println(i);
i++;
}
while (i<6);