SHARE
TWEET

1. Three Numbers

a guest Feb 4th, 2015 89 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. using System;
  2. using System.Collections.Generic;
  3. using System.Globalization;
  4. using System.Linq;
  5. using System.Text;
  6. using System.Threading;
  7. using System.Threading.Tasks;
  8.  
  9. class Program
  10. {
  11.     static void Main()
  12.     {
  13.         Thread.CurrentThread.CurrentCulture = CultureInfo.InvariantCulture;
  14.         int a = int.Parse(Console.ReadLine());
  15.         int b = int.Parse(Console.ReadLine());
  16.         int c = int.Parse(Console.ReadLine());
  17.  
  18.         int biggest = Math.Max(a, Math.Max(b, c));
  19.         int smallest = Math.Min(a, Math.Min(b, c));
  20.         double mean = (double) (a + b + c)/3;
  21.  
  22.  
  23.         Console.WriteLine(biggest);
  24.         Console.WriteLine(smallest);
  25.         Console.WriteLine("{0:F2}", mean);
  26.     }
  27. }
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top