|
Post by Admin on Jun 2, 2014 21:19:16 GMT -5
using System; class Program { static void Main() { Console.WriteLine("Please enter a number");
int UserNumber = int.Parse(Console.ReadLine());
if (UserNumber == 1) { Console.WriteLine("Your number is one"); }
else if (UserNumber == 2) { Console.WriteLine("Your number is two"); }
else if (UserNumber == 3) { Console.WriteLine("Your number is three"); }
else // if (UserNumber != 1 && UserNumber != 2 && UserNumber != 3) { Console.WriteLine("Your number is not between 1 and 3"); } } }
using System; class Program { static void Main() { Console.WriteLine("Please enter a number");
int UserNumber = int.Parse(Console.ReadLine());
if (UserNumber == 10 || UserNumber == 20) { Console.WriteLine("Your number is 10 or 20"); } } }
|
|