Question: DIRECTIONS Write a program and name it lab3c.cpp. Define a character variable and initialize it to the letter ' n '; Define an integer variable
DIRECTIONS\ Write a program and name it lab3c.cpp.\ Define a character variable and initialize it to the letter '
n';\ Define an integer variable and initialize it to zero.\ Add a while loop that will repeat until the letter they enter is '
y' or they correctly calculated
4+18. Both conditions must be true for the loop to quit.\ The following code should happen inside the loop:\ ask the user "Please enter a letter."\ Read in their letter.\ Print out the letter they entered.\ Ask the user for the result of the calculation of
4+18.\ SAMPLE OUTPUT\ What do you get if you. add
4+18? 20\ Enter the letter '
y' if you want to quit.\ Y\ The letter you entered is
y\ oh goat foot! You forgot how to add!\ What do you get if you add
4+18? 22\ Enter the letter '
y' if you want to quit.\ n\ The letter you entered is
n\ What do you get if you add
4+18? 22\ Enter the letter '
y' if you want to quit.\ Y\ The letter you entered is y

Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
