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 _385a
- {
- class Program
- {
- static void Main(string[] args)
- {
- double k = double.Parse(Console.ReadLine());
- double sum = 0;
- int count = 0;
- while (k !=0)
- {
- double num = double.Parse(Console.ReadLine());
- if (num == 0)
- {
- k = 0;
- }
- else if (num > k)
- {
- count++;
- sum += num;
- }
- }
- Console.WriteLine(sum/count);
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement