Advertisement
Guest User

TheBiggestОfFiveNumbers

a guest
Mar 22nd, 2014
240
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C# 0.77 KB | None | 0 0
  1. static void Main()
  2.         {
  3.             float a = float.Parse(Console.ReadLine());
  4.             float b = float.Parse(Console.ReadLine());
  5.             float c = float.Parse(Console.ReadLine());
  6.             float d = float.Parse(Console.ReadLine());
  7.             float e = float.Parse(Console.ReadLine());
  8.             float biggestNum = a;
  9.            
  10.             if (a < b)
  11.             {
  12.                 biggestNum = b;
  13.             }
  14.             if (biggestNum < c)
  15.             {
  16.                 biggestNum = c;
  17.             }
  18.             if (biggestNum < d)
  19.             {
  20.                 biggestNum = d;
  21.             }
  22.             if (biggestNum < e)
  23.             {
  24.                 biggestNum = e;
  25.             }
  26.             Console.WriteLine(biggestNum);
  27.  
  28.         }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement