Created
October 15, 2014 09:30
-
-
Save IvanNikolov/c71b7b3f26d015b0491d 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
using System; | |
//Write a program that finds the biggest of three numbers. | |
//Examples: | |
//a b c biggest | |
//5 2 2 5 | |
//-2 -2 1 1 | |
//-2 4 3 4 | |
class BigestOf3Numbers | |
{ | |
static void Main() | |
{ | |
double a = double.Parse(Console.ReadLine()); | |
double b = double.Parse(Console.ReadLine()); | |
double c = double.Parse(Console.ReadLine()); | |
if (a>b || a>c) | |
{ | |
Console.WriteLine(a); | |
} | |
else if (b>a && b>c) | |
{ | |
Console.WriteLine(b); | |
} | |
else | |
{ | |
Console.WriteLine(c); | |
} | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment