Advertisement
Fundamentalen

TheBiggestOf3Numbers

Mar 20th, 2014
301
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 TheBiggestOf3Numbers
  4. {
  5.     static void Main()
  6.     {
  7.         Console.Write("a = ");
  8.         double a = double.Parse(Console.ReadLine());
  9.         Console.Write("b = ");
  10.         double b = double.Parse(Console.ReadLine());
  11.         Console.Write("c = ");
  12.         double c = double.Parse(Console.ReadLine());
  13.  
  14.         if (a > b && a > c)
  15.         {
  16.             Console.WriteLine("biggest is " + a);
  17.         }
  18.         else if (b > a && b > c)
  19.         {
  20.             Console.WriteLine("biggest is " + b);
  21.         }
  22.         else
  23.         {
  24.             Console.WriteLine("biggest is " + c);
  25.         }
  26.     }
  27. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement