Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- using System;
- namespace ConsoleApp1
- {
- public class Program
- {
- public static void Main()
- {
- var firstNumber = int.Parse(Console.ReadLine());
- var secondNumber = int.Parse(Console.ReadLine());
- var thirdNumber = int.Parse(Console.ReadLine());
- var max = GetMax(firstNumber, secondNumber);
- max = GetMax(max, thirdNumber);
- Console.WriteLine(max);
- }
- public static int GetMax(int num1, int num2)
- {
- if (num1 >= num2)
- {
- return num1;
- }
- return num2;
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement