Write a program that uses a while loop to print out the numbers from one to twenty. Challenge: print them out separated by commas, but be careful to not add an extra comma at the end.
To see this working, head to your live site.
Search
kevinzhao183
Jan 10
Intro to Java 1/9/21 Homework
Intro to Java 1/9/21 Homework
1 comment
0
class Main { public static void main(String args[]) { int x = 0; while (x < 20) { x++; System.out.println(x); } } }