Question: Write a program that prints the message, Hello, my name is Hal! Then, on a new line, the program should print the message What

  Write a program that prints the message, "Hello, my name is Hal!" 

Write a program that prints the message, "Hello, my name is Hal!" Then, on a new line, the program should print the message "What would you like me to do?" Then it's the user's turn to type in an input. You haven't yet learned how to do it-just use the following lines of code: string user input; getline(cin, user input); Finally, the program should ignore the user input and print the message "I am sorry, I cannot do that." This program uses the string data type. To access this feature, 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 would you like me to do? Clean up my room I am sorry, I cannot do that. When running the program, remember to press the Enter key after typing the last word of the input line.

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Finance Questions!