
LANGUAGE: C++
CHALLENGE:
Assume that name has been declared suitably for storing names (like “Misha”, “Emily” and “Sofia”) 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 “Rachel” it would print out “Greetings, Rachel”.
SOLUTION:
cin >> name; cout << "Greetings, " << name;
just remove the ;
cin >> name;
cout << "Greetings, " << name;
I am curious as to why we need to remove a semicolon, these are two separate operations?
remove the pre*
Good Catch, I am not sure why that bit of HTML was showing through but I took care of it. Thanks for the feedback.