Coding Exercise: Display User Input

Test your I/O skills in C#.

We'll cover the following

Problem

This exercise asks a user for information and repeats it back. Create a console application that meets the three requirements listed below:

  1. Display the question Hello, what is your name?.
  2. Save the user’s response to a variable.
  3. Output the response Thank you, {name that was saved}.

Sample input

The program will accept a Name as a string, for example:

Adam

Expected output

The finished output of the program should look like the example below:

Hello, what is your name?
Adam
Thank you, Adam

Get hands-on with 1400+ tech skills courses.