Advertisement
Guest User

Untitled

a guest
Mar 19th, 2018
74
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C# 0.50 KB | None | 0 0
  1. using System;
  2.  
  3. namespace biggestnum
  4. {
  5.     class Program
  6.     {
  7.         static void Main(string[] args)
  8.         {
  9.             Console.Write("n = ");
  10.             var n = int.Parse(Console.ReadLine());
  11.             var max = -10000000000000;
  12.             for (var i = 0; i < n; i++)
  13.             {
  14.                 var num = int.Parse(Console.ReadLine());
  15.                 if (num > max)
  16.                     max = num;
  17.             }
  18.             Console.WriteLine("max = " + max);
  19.  
  20.         }
  21.     }
  22. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement