Advertisement
RukoLob

Untitled

Aug 18th, 2017
66
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C# 0.85 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 ForLesson15
  8. {
  9.     class Program
  10.     {
  11.         static void Main(string[] args)
  12.         {
  13.             int Aps = Convert.ToInt32(Console.ReadLine());
  14.             int Bps = Convert.ToInt32(Console.ReadLine());
  15.             int Cps = Convert.ToInt32(Console.ReadLine());
  16.             Console.WriteLine(Min(Aps, Bps, Cps));
  17.         }
  18.         public static int Min(int a, int b, int c)
  19.         {
  20.             if (a < b)
  21.             {
  22.                 if (a < c)
  23.                 {
  24.                     return a;
  25.                 }
  26.                 else
  27.                 {
  28.                     return c;
  29.                 }
  30.             }
  31.             else
  32.             {
  33.                 return b;
  34.             }
  35.         }
  36.     }
  37. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement