Assume that name has been declared suitably for storing names (like “Amy”, “Fritz” and “Moustafa”) Write some code that reads a value into name then prints the message “Greetings, NAME !!!” where NAME is replaced the value that was read into name . For example, if your code read in “Hassan” it would print out “Greetings, Hassan!!!”.

LANGUAGE: C++

CHALLENGE:

Assume  that name  has been declared  suitably for storing names  (like “Amy”, “Fritz” and “Moustafa”) Write some code that reads a value  into name  then prints the message  “Greetings, NAME !!!” where NAME  is replaced the value  that was read into name . For example, if your code read in “Hassan” it would print out “Greetings, Hassan!!!”.

SOLUTION:

cin >> name;
cout << "Greetings, " << name << "!!!";