Question: Open the part 1 . cpp file. In the function, write a program that prints a simple form letter on the console based on user
Open the partcpp file. In the function, write a program that prints a simple form letter on the console based on user input.
Define a string variable
Prompt the user with "Enter the first name of the person you want to write to:
Prompt the user to enter the age of the recipient and assign it to an integer variable
Prompt the user for the name of another friend and store it in a string variable friendname
Start your letter with "Dear Don't forget the comma and the newline.
Add an introductory line or two, like "How are you? I am fine. I miss you." Be sure to indent the first line. Add a few more lines of your choosing it's your letter.
Now add a line to your letter: "Have you seen lately?"
Have your program print, "I hear you just had a birthday, and you are years old."
If your friend is under write, "Next year, you will be If your friend is write, "Next year, you will be able to vote." If your friend is over write, "Are you retired?". Check your program to make sure it responds appropriately to each kind of value. skip this step if you don't remember ifconditions
Add "Yours sincerely followed by two blank lines for a signature, followed by your name.
Part :
Open the partcpp file. In the function, write a program that prompts the user to enter some number of pennies cent coins nickels cent coins dimes cent coins quarters cent coins halfdollar coins cent coins and onedollar coins cent coins Query the user separately for the number of each size coin, eg "How many pennies do you have?" Then your program should print out something like this:
You have pennies.
You have nickels.
You have dimes.
You have quarters.
You have halfdollar coins.
You have onedollar coins.
The value of all of your coins is cents.
Make some improvements extra:
If only one of a coin is reported, make the output grammatically correct, eg dimes and dime not dimes
Report the sum in dollars and cents, ie $ instead of cents.
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
