Advertisement
MARINA_GREBENAROVA

Min_Number

Oct 13th, 2021
798
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 Min_Number
  4. {
  5.     class Program
  6.     {
  7.         static void Main(string[] args)
  8.         {
  9.             string input = Console.ReadLine();
  10.  
  11.             int minNum = int.MaxValue;
  12.  
  13.             while (input != "Stop")
  14.             {
  15.                 int number = int.Parse(input);
  16.                 if (number < minNum)
  17.                 {
  18.                     minNum = number;
  19.                 }
  20.                 input = Console.ReadLine();
  21.  
  22.             }
  23.             Console.WriteLine(minNum);
  24.         }
  25.     }
  26. }
  27.  
  28.                
  29.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement