Sams Teach Yourself C++ in 21 Days

(singke) #1

Exercises ..........................................................................................................



  1. What would be the correct variable type in which to store the following
    information?
    a. Your age
    b. The area of your backyard
    c. The number of stars in the galaxy
    d. The average rainfall for the month of January

  2. Create good variable names for this information.

  3. Declare a constant for pi as 3.14159.

  4. Declare a floatvariable and initialize it using your pi constant.


66 Day 3

Free download pdf