Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- using System;
- using System.Collections.Generic;
- using System.Linq;
- using System.Text;
- using System.Threading.Tasks;
- namespace _30.MaxMethod
- {
- class Program
- {
- static void Main(string[] args)
- {
- int firstNum = int.Parse(Console.ReadLine());
- int secondNum = int.Parse(Console.ReadLine());
- int thirdNum = int.Parse(Console.ReadLine());
- Console.WriteLine(GetMaxNum(GetMaxNum(firstNum,secondNum),thirdNum));
- //Console.WriteLine(Math.Max(Math.Max(firstNum,secondNum),thirdNum));
- }
- static int GetMaxNum(int num1, int num2)
- {
- int maxNum = int.MinValue;
- if (num1 > num2)
- {
- maxNum = num1;
- }
- else
- {
- maxNum = num2;
- }
- return maxNum;
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement