String input and output
📖 Scenario: You are creating a simple program that asks a user for their name and then greets them.
🎯 Goal: Build a program that takes a user's name as input and then prints a greeting message including their name.
📋 What You'll Learn
Use a
string variable called name to store the user's input.Use
cin to read the user's name.Use
cout to print the greeting message.💡 Why This Matters
🌍 Real World
Programs often need to get information from users and show messages back. This is the basic way to interact with people using a computer.
💼 Career
Knowing how to handle text input and output is essential for many programming jobs, especially when building command-line tools or simple user interfaces.
Progress0 / 4 steps