Advertisement
Guest User

Untitled

a guest
Dec 15th, 2019
72
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.62 KB | None | 0 0
  1. using System;
  2.  
  3. public class Test
  4. {
  5. public static void Main()
  6. {
  7. double a, b, c;
  8. string s;
  9. s = Console.ReadLine();
  10. a = double.Parse(s);
  11. s = Console.ReadLine();
  12. b = double.Parse(s);
  13. s = Console.ReadLine();
  14. c = double.Parse(s);
  15. double max, min;
  16. if (a >= b){
  17. if (a >= c){
  18. max = a;
  19. }else{
  20. max = c;
  21. }
  22. }else{
  23. if (b >= c){
  24. max = b;
  25. }else{
  26. max = c;
  27. }
  28. }
  29.  
  30. if (a <= c && a <= b){
  31. min = a;
  32. }else if (c <= a && c <= b){
  33. min = c;
  34. }else{
  35. min = b;
  36. }
  37. Console.WriteLine("Maximum: " + max);
  38. Console.WriteLine("Minimum: " + min);
  39.  
  40. }
  41. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement