Advertisement
social1986

Untitled

Oct 23rd, 2017
79
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.65 KB | None | 0 0
  1. using System;
  2.  
  3. namespace ConsoleApp1
  4. {
  5. public class Program
  6. {
  7. public static void Main()
  8. {
  9. var firstNumber = int.Parse(Console.ReadLine());
  10. var secondNumber = int.Parse(Console.ReadLine());
  11. var thirdNumber = int.Parse(Console.ReadLine());
  12.  
  13. var max = GetMax(firstNumber, secondNumber);
  14. max = GetMax(max, thirdNumber);
  15. Console.WriteLine(max);
  16. }
  17.  
  18. public static int GetMax(int num1, int num2)
  19. {
  20. if (num1 >= num2)
  21. {
  22. return num1;
  23. }
  24. return num2;
  25. }
  26. }
  27. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement