Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- using System;
- class ABC
- {
- static void Main()
- {
- decimal a = decimal.Parse(Console.ReadLine());
- decimal b = decimal.Parse(Console.ReadLine());
- decimal c = decimal.Parse(Console.ReadLine());
- if (Math.Max(a,b) > c)
- {
- Console.WriteLine(Math.Max(a,b));
- }
- else
- {
- Console.WriteLine(c);
- }
- if (Math.Min(a,b)<c)
- {
- Console.WriteLine(Math.Min(a,b));
- }
- else
- {
- Console.WriteLine(c);
- }
- decimal resultAll = (a + b + c) / 3;
- Console.WriteLine("{0:F3}",resultAll);
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment