Dana Vrajitoru
C101 Computer Programming

Lab 6

Date: Thursday, February 19, 2004.

Ex. 1 Ask the user for a number and output all the even positive numbers smaller or equal to it. For example, if the user enters 15, then the program should output

0 2 4 6 8 10 12 14

Use a while loop for this exercise.

Ex. 2 Transform the loop from ex. 1 into a for loop.

Send me: Source code files for ex. 1 and 2 containing one example of the program execution.