Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- using System;
- namespace _02._Max_Method
- {
- class Program
- {
- static void Main(string[] args)
- {
- int first = int.Parse(Console.ReadLine());
- int second = int.Parse(Console.ReadLine());
- int third = int.Parse(Console.ReadLine());
- int result = GetMax(first, second);
- int total = GetMax(result, third);
- Console.WriteLine(total);
- }
- private static int GetMax(int first, int second)
- {
- if (first >= second)
- {
- return first;
- }
- else
- {
- return second;
- }
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment