Advertisement
Guest User

1. Three Numbers

a guest
Feb 4th, 2015
110
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.71 KB | None | 0 0
  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. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement