Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- using System;
- using System.Collections.Generic;
- using System.Linq;
- using System.Text;
- using System.Threading.Tasks;
- namespace Variables_2
- {
- class Program
- {
- static void Main(string[] args)
- {
- Console.WriteLine("Chose a number between one and three.");
- string userValue = Console.ReadLine();
- string message = "";
- // These are the IF statements.
- if (userValue == "1")
- message = "You chose 1!";
- if (userValue == "2")
- message = "You chose 2!";
- if (userValue == "3")
- message = "You chose 3!";
- else
- message = "You didn't chose 1, 2, or 3!";
- Console.WriteLine(message);
- Console.ReadLine();
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement