anizko

05. Min Number

Apr 4th, 2019
146
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C# 0.57 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 Min = int.MaxValue;
  12.  
  13.                 while (Count > 0)
  14.                 {
  15.                     int Number = int.Parse(Console.ReadLine());
  16.                     if (Number < Min)
  17.                     {
  18.                         Min = Number;
  19.                     }
  20.  
  21.                     Count--;
  22.  
  23.                 }
  24.  
  25.                 Console.WriteLine(Min);
  26.             }
  27.         }
  28.  
  29. }
Advertisement
Add Comment
Please, Sign In to add comment