Idea ask name and favourite colour print greeting
Context: The Greeting Tool demonstrates basic I/O operations in .NET 10. The idea is simple: ask for name and favorite color, then display a greeting.
The Greeting Tool is a simple interactive console application that demonstrates basic input/output operations.
Program Flow
Section titled “Program Flow”- Ask for name: Prompt the user to enter their name
- Ask for favorite color: Prompt for their favorite color
- Print greeting: Display a personalized message
Example Interaction
Section titled “Example Interaction”What is your name? > SarahWhat is your favorite color? > Purple
Hello Sarah!Your favorite color, Purple, is beautiful!Learning Objectives
Section titled “Learning Objectives”- Reading user input with
Console.ReadLine() - Storing values in variables
- String concatenation and interpolation
- Writing formatted output
Potential Enhancements
Section titled “Potential Enhancements”- Add colorized console output
- Validate input (non-empty)
- Save greetings to a file
- Loop until user types “quit”