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)
- {
- Console.WriteLine("n=");
- var n = int.Parse(Console.ReadLine());
- var max = int.MinValue;
- for (var i = 0; i < n; i++)
- {
- var num = int.Parse(Console.ReadLine());
- if (num > max)
- {
- max = num;
- }
- Console.WriteLine(max);
- }
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement