Using while loop print the integers from 21 to 51 in java
Answers
Answered by
1
Answer:
Change class name, package etc. of your own please if you didn't liked this one.
Explanation:
package com.company;
public class Main {
public static void main(String args[]) {
int a = 21;
while (a<52 && a >20){
System.out.println(a);
a = a+1;
}
}
}
Similar questions