knikolov98

Untitled

Sep 25th, 2019
54
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C# 0.56 KB | None | 0 0
  1. using System;
  2.  
  3. namespace MinNumber
  4. {
  5.     class Program
  6.     {
  7.         static void Main(string[] args)
  8.         {
  9.             int numberCount = int.Parse(Console.ReadLine());
  10.             int input = 0;
  11.  
  12.             int min = int.MaxValue;
  13.             int counter = 0;
  14.  
  15.             while (counter < numberCount)
  16.  
  17.             {
  18.                 input = int.Parse(Console.ReadLine());
  19.  
  20.                 if (input < min)
  21.                     min = input;
  22.  
  23.                 counter++;
  24.             }
  25.  
  26.             Console.WriteLine(min);
  27.         }
  28.     }
  29. }
Add Comment
Please, Sign In to add comment