Problem 66

Counting Machine

Write a program that gets an integer from the user. Count from 0 to that number. Use a for loop to do it.

Count to: 19
0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19
Count to: 8
0 1 2 3 4 5 6 7 8
Count to: 25
0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25

◄ 65: Ten Times 67: Counting Machine Revisited ►



Adapted from ProgrammingByDoing.com
©2013 Graham Mitchell

Creative Commons License
This work is licensed under a Creative Commons Attribution-NonCommercial-ShareAlike 3.0 United States License.