Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- using System;
- using System.Collections.Generic;
- using System.Linq;
- using System.Text;
- using System.Threading.Tasks;
- namespace seg
- {
- class Program
- {
- static void Main(string[] args)
- {
- int a = int.Parse(Console.ReadLine());
- int b = int.Parse(Console.ReadLine());
- int c = int.Parse(Console.ReadLine());
- int min = int.MaxValue;
- int max = int.MinValue;
- int av = a + b + c;
- if (a < min)
- {
- min = a;
- }
- if (b < a)
- {
- min = b;
- }
- if (c < b)
- {
- min = c;
- if (a < c)
- {
- min = a;
- }
- }
- if (a > max)
- {
- max = a;
- }
- if (b > a)
- {
- max = b;
- }
- if (c > b)
- {
- max = c;
- if (a > c)
- {
- max = a;
- }
- }
- av = av - (min + max);
- Console.WriteLine($"{min} {av} {max}");
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement