Write a for loop that prints the integers 50 through 1, separated by spaces. Use no variables other than count.

2
Write a for loop that prints the integers 50 through 1, separated by spaces. Use no variables other than count.

LANGUAGE: JAVA

CHALLENGE:
Write a for loop that prints the integers 50 through 1, separated by spaces. Use no variables other than count.

SOLUTION:

for (int count = 50; count >= 1; count–- ){
     System.out.print(count + " ");
}

2 comments

Add comment