This post is from a low-reputation account and contains an unverified outbound link. Be cautious before clicking external links.
The following C++ program asks the user to type his first name
Words
31
Reading
1 min
Listen
Play
7y
The program uses the input operator to display the prompt for the user's name.
The code:
#include iostream
int main(void)
{
char first_name[64];
std::cout << "Type your first name: ";
std::cin >> first_name;
std::cout << "Hello, " << first_name << "!\n";
}
▶️ DTube
▶️ YouTube