anizko

04. Max Number

Apr 4th, 2019
128
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C# 0.53 KB | None | 0 0
  1. using System;
  2.  
  3. namespace Max_Number
  4. {
  5.     class Program
  6.     {
  7.         static void Main(string[] args)
  8.         {
  9.  
  10.             int Count = int.Parse(Console.ReadLine());
  11.             int Max = int.MinValue;
  12.  
  13.             while(Count!=0)
  14.             {
  15.                 int Number = int.Parse(Console.ReadLine());
  16.                 if(Number>Max)
  17.                 {
  18.                     Max = Number;
  19.                 }
  20.                
  21.                 Count--;
  22.  
  23.             }
  24.  
  25.             Console.WriteLine(Max);
  26.         }
  27.     }
  28. }
Advertisement
Add Comment
Please, Sign In to add comment