Write a program that prints out a message Hello, my name is Hal! Then, on a newline, the program should print the message What is your name? As in ExerciseP1.2, 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 meetyou! To print the user name, simply usecout << user_name;As in Exercise P1.2, 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?DaveHello, Dave. I am glad to meet you!
Basic Introduction to UNIX/linux Claude Cantin (claude.cantin@nrc.ca) http://www.nrc.ca/imsb/rcsg Research Computing Support Group Information Management Services Branch National Research Council January 31, 2016 2 This page intentionally left blank. 3 This document was produced by Claude Cantin of the National Research Council of Canada. Reproductions are permitted for non-profit purposes provided the origin of the document is acknowledged. Claude Cantin National Research Council of Canada 4 History of printing: Date Copies March 2003 200 March 2001 200 June 1999 200 November 1997 200 July 1996 200 November 1995 150 March 1995 150 February 1994 150 October 1993 100 August 1993 75 February 1993 75 November 1992 35 September 1992 40 February 1992 50 December 1991 50 April 1991 50 September 1990 40 January 1990 40 Table 1: Printings. Contents