SHARE
TWEET

Max_Number

koksibg Nov 4th, 2017 82 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. using System;
  2. using System.Collections.Generic;
  3. using System.Linq;
  4. using System.Text;
  5. using System.Threading.Tasks;
  6.  
  7. namespace Max_Number
  8. {
  9.     class Max_Number
  10.     {
  11.         static void Main(string[] args)
  12.         {
  13.             int n = int.Parse(Console.ReadLine());
  14.             int first = int.Parse(Console.ReadLine());
  15.             int max = first;
  16.             for (int i = 2; i <= n; i++)
  17.             {
  18.                 int num = int.Parse(Console.ReadLine());
  19.                 if (num > max) max = num;
  20.             }
  21.             Console.WriteLine(max);
  22.         }
  23.     }
  24. }
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top