Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

C++ language and please add comment (use string aswell) thank you 1. This drill is to write a program that produces a letter based on

image text in transcribed

C++ language and please add comment (use string aswell) thank you

1. This drill is to write a program that produces a letter based on user input. Begin by typing the code from the types lecture, slide 4. change the prompt to "Enter your name:" to enter his/her first name and last name, and writing "Yours sincerely, first_name last_name" where first_name last_name is the name entered by the user. 2. Now prompt the user to add the recipient of the letter, and store it in recipient. Add "Dear recipient," 3. Now prompt the user to add their current age. Add "I would like to ask you to do catering at my ageth birthday party", where age is your new age. Be sure to indent the first line of text. 4. Prompt the user to add her birthday, in the form dd mm. Add something like "My birthday is on the dd/mm/2021, hope you're not booked up that day." Add some more lines of your choosing -- it's your party! 5. Now prompt the user for the name and gender of a friend, and store it in friend_name and friend_gender. Add a line to your letter: "I will be celebrating my birthday with my good friend friend_name. Can you supply a cake with his/her name on it?", replacing friend_name with your friend's name and 'his/her' with his or her, depending on the value of friend_gender. 6. If your new age is less than 18, add 'Soft drinks only please!' 7. If your new age is less than 12, ask for a clown as well

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Database Concepts

Authors: David Kroenke, David Auer, Scott Vandenberg, Robert Yoder

8th Edition

013460153X, 978-0134601533

More Books

Students also viewed these Databases questions

Question

How wide are Salary Structure Ranges?

Answered: 1 week ago