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 Max_Number
- {
- class Max_Number
- {
- static void Main(string[] args)
- {
- int n = int.Parse(Console.ReadLine());
- int first = int.Parse(Console.ReadLine());
- int max = first;
- for (int i = 2; i <= n; i++)
- {
- int num = int.Parse(Console.ReadLine());
- if (num > max) max = num;
- }
- Console.WriteLine(max);
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement