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 ConsoleApplication3
- {
- class Program
- {
- static void Main(string[] args)
- {
- Console.WriteLine("Please enter your first number");
- int num = Convert.ToInt32(Console.ReadLine());
- Console.WriteLine("Please Enter your second number");
- int num2 = Convert.ToInt32(Console.ReadLine());
- Console.WriteLine(GetMax(num, num2));
- }
- static int GetMax(int num, int num2)
- {
- if (num > num2)
- {
- return num;
- }
- else if (num<num2)
- {
- return num2;
- }
- return Convert.ToInt32("error");
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement