Advertisement
v1ppers0nn

The Biggest of Five Numbers

Apr 10th, 2014
180
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C# 0.63 KB | None | 0 0
  1. using System;
  2.  
  3. class biggest3num
  4. {
  5.     static void Main()
  6.     {
  7.         Console.WriteLine("Write three numbers: ");
  8.         double a = double.Parse(Console.ReadLine());
  9.         double b = double.Parse(Console.ReadLine());
  10.         double c = double.Parse(Console.ReadLine());
  11.  
  12.         if (a > b && a > c)
  13.         {
  14.             Console.WriteLine("The biggest number is {0}", a);
  15.         }
  16.         else if (b > a && b > c)
  17.         {
  18.             Console.WriteLine("The biggest number is {0}", b);
  19.         }
  20.         else if (c>a && c>b)
  21.         {
  22.             Console.WriteLine("The biggest number is {0}", c);
  23.         }
  24.     }
  25. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement