Advertisement
Guest User

Problem 6

a guest
Dec 13th, 2015
94
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C# 1.27 KB | None | 0 0
  1. using System;
  2. using System.Collections.Generic;
  3. using System.Linq;
  4. using System.Text;
  5. using System.Threading.Tasks;
  6.  
  7. namespace task_6
  8. {
  9.     class Program
  10.     {
  11.         static void Main(string[] args)
  12.         {
  13.             Console.WriteLine("Please write a: ");
  14.             double a = double.Parse(Console.ReadLine());
  15.             Console.WriteLine("Please write b: ");
  16.             double b = double.Parse(Console.ReadLine());
  17.             Console.WriteLine("Please write c: ");
  18.             double c = double.Parse(Console.ReadLine());
  19.             Console.WriteLine("Please write d: ");
  20.             double d = double.Parse(Console.ReadLine());
  21.             Console.WriteLine("Please write e: ");
  22.             double e = double.Parse(Console.ReadLine());
  23.  
  24.             if ((a > b) && (a > c) && (a > d) && (a > e)) Console.WriteLine("The biggest is: " + a);
  25.             if ((b > a) && (b > c) && (b > d) && (b > e)) Console.WriteLine("The biggest is: " + b);
  26.             if ((c > b) && (c > a) && (c > d) && (c > e)) Console.WriteLine("The biggest is: " + c);
  27.             if ((d > b) && (d > a) && (d > c) && (d > e)) Console.WriteLine("The biggest is: " + d);
  28.             if ((e > b) && (e > a) && (e > d) && (e > c)) Console.WriteLine("The biggest is: " + e);
  29.         }
  30.     }
  31. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement