Next: The Assignment statement Up: A simple C++ program Previous: Review questions

Exercises

  1. Using literal character strings and cout print out a large letter E as below:
    XXXXX
    X
    X
    XXX
    X
    X
    XXXXX
    

  2. Write a program to read in four characters and to print them out, each one on a separate line, enclosed in single quotation marks.

  3. Write a program which prompts the user to enter two integer values and a float value and then prints out the three numbers that are entered with a suitable message.



Next: The Assignment statement Up: A simple C++ program Previous: Review questions