Created
September 16, 2013 22:07
-
-
Save RMcGee/6587267 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//Higest of Two Numbers #1 | |
//get first and second | |
Double first, second, highest; | |
String message; | |
Console.WriteLine("Enter first number"); | |
first = Double.Parse(Console.ReadLine()); | |
Console.WriteLine("Enter second number"); | |
second = Double.Parse(Console.ReadLine()); | |
//Determine the higher number | |
if (first > second) | |
{ | |
highest = first; | |
message = "first"; | |
} | |
else | |
{ | |
highest = second; | |
message = "second"; | |
} | |
Console.WriteLine("First = " + first + | |
" second = " + second + ", the " + message + | |
" number entered had the higher value, which was " + | |
highest); | |
Console.ReadLine(); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment