write a program in java using do while loop to print numbers 20 to 0
Answers
Answered by
1
Answer:
I think it would use do while loop
Explanation:
hope it will help you please mark me as brainlist and follow me:)
Answered by
4
/ Program to display numbers from 1 to 5
class Main {
public static void main(String[] args) {
// declare variables
int i = 1, n = 10;
// while loop from 1 to 10
while(i <= n) {
System.out.println(i);
i++;
}
}
}
Similar questions