Advertisement
kallyy7

Untitled

Mar 3rd, 2018
142
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C# 0.80 KB | None | 0 0
  1. using System;
  2. using System.Collections.Generic;
  3. using System.Linq;
  4. using System.Text;
  5. using System.Threading.Tasks;
  6.  
  7. namespace ConsoleApp4
  8. {
  9.     class Program
  10.     {
  11.         static void Main(string[] args)
  12.         {
  13.             int a = int.Parse(Console.ReadLine());
  14.             int b = int.Parse(Console.ReadLine());
  15.             int c = int.Parse(Console.ReadLine());
  16.             int min = int.MaxValue;
  17.             if (a < min)
  18.             {
  19.                 min = a;
  20.             }
  21.             if (b < a)
  22.             {
  23.                 min = b;
  24.             }
  25.             if (c < b)
  26.             {
  27.                 min = c;
  28.                 if (a < c)
  29.                 {
  30.                     min = a;
  31.                 }
  32.             }
  33.             Console.WriteLine(min);
  34.         }
  35.     }
  36. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement