Answer to Question #261260 in C++ for nuuuuriiiii

Question #261260

1.     Write C++ statements that prompt the user to enter a person’s last name and then store the last name into the variable name.


1
Expert's answer
2021-11-05T17:27:49-0400
#include <iostream>

int main()
{
    std::cout << "Enter the last name: ";

    std::string name;
    std::cin >> name;

    std::cout << "Last name is '" << name << "'\n";

    return 0;    
}

Need a fast expert's response?

Submit order

and get a quick answer at the best price

for any assignment or question with DETAILED EXPLANATIONS!

Comments

No comments. Be the first!

Leave a comment

LATEST TUTORIALS
New on Blog
APPROVED BY CLIENTS