Respuesta :

Following are the C++ program to print the value input value with a message.

Program Explanation:

  • Defining header file.
  • Defining the main method.
  • Defining a string variable "first_name", that inputs value from the user-end.
  • After inputs the values a print method is declared that prints string value with the message.

Program:

#include <iostream>//header file

using namespace std;

int main()//main method

{

   string first_name;//defining string variable

   cin>>first_name;//input string value

   cout<<"Hello "<<first_name<<", and welcome to console.";//print string value with message

   return 0;

}

Output:

Please find the attached file.

Learn more:

brainly.com/question/5080625

Ver imagen codiepienagoya
ACCESS MORE