Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- using System;
- using System.Collections.Generic;
- using System.Text;
- namespace Laba2
- {
- class Program
- {
- static void Main(string[] args)
- {
- int a;
- float sr = 0;
- Console.WriteLine("Введите размер массива");
- a = Convert.ToInt32(Console.ReadLine());
- int[] m= new int[a];
- Console.WriteLine("Введите элементы массива");
- for (int i = 0; i < a; i++)
- {
- m[i] = Convert.ToInt32(Console.ReadLine());
- sr += m[i];
- }
- sr=sr/a;
- Console.WriteLine("Ср. ариф. = "+sr);
- Console.ReadKey();
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement