1. Course
  2. Introduction to C#
  3. Read user input

Read user input


Last updated: 8/21/2020 Difficulty: Easy

Write a C# program that asks the user What is your favorite animal?. Then stop program execution using the Console.Read statement. When the user presses Enter the program will respond Mine too! on the second line.

Input


                    
                    

Output

What is your favorite color?
Mine too!

Solution

Introduction to C#

7 / 9

Android App


Practice C# anywhere with the free app for Android devices.

Android App

Exercises C# by difficulty


Learn C# at your own pace, the exercises are ordered by difficulty.

Advertising