Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- using System;
- using System.Linq;
- namespace ConsoleApp1
- {
- class Program
- {
- static void Main(string[] args)
- {
- string input = Console.ReadLine();
- var nums = input.Split(' ').Select(Int32.Parse).ToList();
- int extraMarks = nums.Max() + nums.Min();
- int result = (nums.Sum() - extraMarks) / (nums.Count() - 2);
- Console.WriteLine(result);
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement