Skip to content

Instantly share code, notes, and snippets.

@RMcGee
Last active December 22, 2015 20:38
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save RMcGee/6527414 to your computer and use it in GitHub Desktop.
Save RMcGee/6527414 to your computer and use it in GitHub Desktop.
Console.WriteLine("Largest number: Enter 3 numbers - press 'Enter' key after each");
Int32 num1, num2, num3, high, high2;
num1 = Int32.Parse(Console.ReadLine());
num2 = Int32.Parse(Console.ReadLine());
num3 = Int32.Parse(Console.ReadLine());
high = Math.Max(num1, num2);
high2 = Math.Max(high, num3);
Console.WriteLine("The highest number is {0}", high2);
Console.ReadLine();
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment