text: Program to Print Message
  Program plan:
  ? Display the statements using “cout” function.
  ? Get the input entered by user using “getline” function.
  Program:
  /**********************************************************
  * This program gets and print message. * **********************************************************/
  /* Header file section */
  /* header file contains the definition of the input and output functions.*/
  #include
  #include
  //standard namespace
  using namespace std;
  /* main function with integer return type */
  int main()
  {
  Use “cout” function to display the statements.
  //to print the statement as it is on console.
  cout<<"Hello, my name is Hal!
  ";
  cout<<"What would you like me to do?
  ";
  The input entered by user is of string data type as required.
  //user_input is a variable of data type string.
  string user_input;
  Get the input “user_input” that is of string data type and entered by the user.
  //user input is taken by this line
  //getline() is used to get input from user.
  getline(cin, user_input);
  Display the last statement of the program.
  cout<<"I am sorry, I cannot do that.
  ";
  // pause system for a while
  system("Pause”);
  return 0;
  }
  Sample Output:
  Hello, my name is Hal!
  What would you like me to do?
  draw a picture
  I am sorry, I cannot do that.
  Press any key to continue . . .