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;
- namespace Revision_01
- {
- class Program
- {
- static void Main(string[] args)
- {
- Console.WriteLine("Please enter 3 numbers, One at a time.");
- int num1 = int.Parse(Console.ReadLine());
- int num2 = int.Parse(Console.ReadLine());
- int num3 = int.Parse(Console.ReadLine());
- int tempNum;
- tempNum = num1;
- num1 = num3;
- num3 = tempNum;
- Console.WriteLine("Here are you numbers in reverse order");
- Console.WriteLine(num1);
- Console.WriteLine(num2);
- Console.WriteLine(num3);
- Console.WriteLine("Please enter H for high score or L for low score.");
- string keyInput = Console.ReadLine();
- int highNum = num1;
- int lowNum = num1;
- if (keyInput == "H" || keyInput == "h")
- {
- if (highNum < num2)
- {
- highNum = num2;
- }
- if (highNum < num3)
- {
- highNum = num3;
- }
- Console.WriteLine(highNum);
- }
- if (keyInput == "L" || keyInput == "l")
- {
- if (lowNum > num2)
- {
- lowNum = num2;
- }
- if (lowNum > num3)
- {
- lowNum = num3;
- }
- Console.WriteLine(lowNum);
- }
- Console.ReadKey();
- }
- }
- }
Add Comment
Please, Sign In to add comment