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 ConsoleApp3
- {
- class Program
- {
- static void Main(string[] args)
- {
- Console.WriteLine("Вводите");
- String a = Console.ReadLine();
- Char b = ' ';
- String[] c = a.Split(b);
- int z = 0;
- double y = 0;
- double x = 0;
- double k = 0;
- while (z<c.Length)
- {
- if (Char.IsNumber(c[z],0)== true)
- {
- x = Convert.ToDouble(c[z]);
- y = y + x;
- k = k + 1;
- }
- z = z + 1;
- }
- Console.WriteLine(y*10 / k);
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement