Skip to content

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.

  1. Ask for name: Prompt the user to enter their name
  2. Ask for favorite color: Prompt for their favorite color
  3. Print greeting: Display a personalized message
Terminal window
What is your name? > Sarah
What is your favorite color? > Purple
Hello Sarah!
Your favorite color, Purple, is beautiful!
  • Reading user input with Console.ReadLine()
  • Storing values in variables
  • String concatenation and interpolation
  • Writing formatted output
  • Add colorized console output
  • Validate input (non-empty)
  • Save greetings to a file
  • Loop until user types “quit”