Write a program CountingLoops.java
with a main()
method that demonstrates counting from 0 to 9 with a while
loop and with a for
loop. The program should also have the user enter an integer value n
, and print out the numbers from 1 to n
inclusive using both a while
loop and a for
loop.