Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

P1.2Write a program that prints out a message Hello, my name is Hal! Then, on a new line, the program should print the message What

P1.2Write a program that prints out a message Hello, my name is Hal! Then, on a new line, the program should print the message What is your name? As in Exercise P1.1, just use the following lines of code: string user_name; getline(cin, user_name); Finally, the program should print the message Hello, user name. I am glad to meet you! To print the user name, simply use cout << user_name; As in Exercise P1.1, you must place the line #include before the main function. Here is a typical program run. The user input is printed in color. Hello, my name is Hal! What is your name? Dave Hello, Dave. I am glad to meet you!

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

Build It For The Real World A Database Workbook

Authors: Wilson, Susan, Hoferek, Mary J.

1st Edition

0073197599, 9780073197593

More Books

Students also viewed these Databases questions

Question

7. Define cultural space.

Answered: 1 week ago

Question

8. Describe how cultural spaces are formed.

Answered: 1 week ago