You are on page 1of 1

1.

Exercise 1: Write a C++ program to print the following lines:


You are 10 years old.
You are too young to play the game.

2. Exercise 2: Write five C++ statements to print the asterisk pattern as shown below.

*****
*****
*****
*****
*****

3. Write a C++ program to declare two integer , one float variables and assign 10, 15, and 12.6

to them respectively. It then prints these values on the screen.

4. Exercise 4: Write a C++ program to prompt the user to input her/his name and print this

name on the screen, as shown below. The text from keyboard can be read by using cin>> and

to display the text on the screen you can use cout<<

5. Exercise 5: Write a C++ program to prompt the user to input 3 integer values and print these

values in forward and reversed order, as shown below.

You might also like