Assignment B

Primary focus on chapters 2 Introduction to C++ and 3 Expressions and Interactivity

For each problem:

Problem B1

Declare the following three variables:

char    letter;
int     number;
double  decimalNumber;
  

Prompt the user to enter a letter.
Read the letter into the variable   letter
Assign to the variable   number   the value from the variable   letter
Assign to the variable   decimalNumber   the value from the variable   number
Print the values of the three variables using the following format:

Character:       K
Number:          75
Decimal number:  75
  

Test the program with the input letter   a   and copy the results into a comment at the end of your code:
/* Execution Results:
    Put the results here.
*/
Test the program again with the input letter   A   and copy these results below the first execution results.

Print the completed program with both execution results.

Problem B2

You will need to include the string library, as well as the iostream library, for this problem.

Write a program that has three string variables. Initialize them with the following:
string 1: The Wizard of Oz
string 2: Stagecoach
string 3: Gosford Park
Print the strings, one per line.
No user input is needed.
Print the completed program with both execution results.
Staple the problems together