Write a program that prints the message, Hello, my name is Hal! Then, on a new...
Fantastic news! We've Found the answer you've been seeking!
Question:
Transcribed Image Text:
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 <string> 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. 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 <string> 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.
Expert Answer:
Posted Date:
Students also viewed these finance questions
-
HOME INSERT fx 0 Oil A 1 Consumption 23 2 3 4 5 (Millions of B Country 18.6 United States 10.3 China DATA 7 8 9 10 11 6 4.7 Japan 3.6 India 3.2 Russia 2.9 Saudi Arabia 2.8 Brazil 2.4 Germany 2.3...
-
In the United States, the last few decades have focused on equality both socially and professionally. Many organizations have hired diversity officers, developed training programs, and charged human...
-
What does ROI stand for in business? A) Return on Investment B) Rate of Interest C) Revenue of Income D) Risk of Inflation Which financial statement provides a snapshot of a company's financial...
-
The tune - up specifications of a car call for the spark plugs to be tightened to a torque of 3 4 N ?? m . You plan to tighten the plugs by pulling on the end of a 2 8 - cm - long wrench. Because of...
-
Use DGAP analysis to determine if there is interest rate risk in the following transaction: A bank obtains $ 25,000 in funds from a customer who makes a deposit with a five- year maturity that pays 5...
-
a. One hundred twenty units of end item Z are needed at the beginning of week 7. Prepare a material requirements plan for component C. Take into account that on hand there are 40 units of Z, 70 units...
-
Explain the main requirements of IFRS 1 that must be satisfied when a company adopts IFRS for the first time.
-
The following information was drawn from the records of Ruth & Associates at December 31, 2010. Required Use the preceding information to construct an income statement, statement of changes in...
-
Hilton Hotels (HLT) is a hospitality company. The Company is engaged in managing, franchising, owning and leasing hotels and resorts, plus licensing its brands and intellectual property. HLT manages,...
-
Companies X and Y have been offered the following rates per annum on a $5 million 10-year investment: Fixed rate Company X 8.0% Company Y 8.8% Floating rate LIBOR LIBOR Company X requires a...
-
a. What should be the best basis for allocating plant administrative costs? b. How to examine the association between Total Plant Administration Costs and each of the potential bases for allocation...
-
6. Calculate the intensity of magnetic field at point P, if square's side is 10 cm, I= 1,5 A and x=5 cm. [3] P
-
3. Derive the truth table for the circuit shown below. A B F2 Figure P4-15 DF
-
"The term 'cost' must be qualified according to its context". Discuss this statement referring to important concepts of cost. (10marks) b) "Financial accounting treats costs very broadly while cost...
-
I NEED A CODE WHICH ADHERE TO ALL THE CONDITIONS GIVEN BELOW I DID A CODE BY MYSELF BUT THE OUTPUT IS NOT COMING SAME AS THE MENU OPTIONS GIVEN BELOW AND THEY SHOULD EXTACTLY MATCH THEN ONLY THE...
-
Review Questions 1. How does job evaluation translate internal alignment policies (loosely coupled versus tight fitting) into practice? What does (a organization strategy and objectives, (b) flow of...
-
What is the difference between direct materials and indirect materials?
-
Max is considering an investment proposal that requires an initial investment of \($91,100\), has predicted Cre cash inflows of \($30,000\) per year for four years and no salvage value. At a discount...
-
The internal rate of return of the investment proposal presented in question 2 is: a. 8 percent b. 10 percent c. 12 percent d Less than 8 percent
-
Which of the following statements is not a characteristic of an effective capital budgeting process? a. Requires an adjustment to make cash flows comparable when they are expected to occur at...
Study smarter with the SolutionInn App