Advertisement
Guest User

Problem 7

a guest
Dec 13th, 2015
74
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C# 1.09 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_7
  8. {
  9.     class Program
  10.     {
  11.         static void Main(string[] args)
  12.         {
  13.  
  14.             Console.WriteLine("Please write a: ");
  15.             double a = double.Parse(Console.ReadLine());
  16.             Console.WriteLine("Please write b: ");
  17.             double b = double.Parse(Console.ReadLine());
  18.             Console.WriteLine("Please write c: ");
  19.             double c = double.Parse(Console.ReadLine());
  20.             if ((a > b) && (a > c) && (b > c)) Console.WriteLine(a + " " + b + " " + c);
  21.             if ((a > b) && (a > c) && (c > b)) Console.WriteLine(a + " " + c + " " + b);
  22.  
  23.             if ((b > a) && (b > c) && (a > c)) Console.WriteLine(b + " " + a + " " + c);
  24.             if ((b > a) && (b > c) && (c > a)) Console.WriteLine(b + " " + c + " " + a);
  25.  
  26.             if ((c > b) && (c > a) && (a > b)) Console.WriteLine(c + " " + a + " " + b);
  27.             if ((c > b) && (c > a) && (b > a)) Console.WriteLine(c + " " + b + " " + a);
  28.  
  29.         }
  30.     }
  31. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement