Advertisement
Guest User

Untitled

a guest
Jun 14th, 2016
103
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C# 0.35 KB | None
  1. using System;
  2.  
  3. class Practice
  4. {
  5.    
  6.     static void Main()
  7.     {
  8.         int n = int.Parse(Console.ReadLine());
  9.         int max = int.MinValue;
  10.  
  11.         for (int i = 0; i < n; i++)
  12.         {
  13.             int number = int.Parse(Console.ReadLine());
  14.             if (number>max) { max = number; }
  15.         }
  16.         Console.WriteLine(max);
  17.     }
  18. }
Advertisement
RAW Paste Data Copied
Advertisement