Daminov Uyg’un O’rta arifmetik qiymatini Topish using System


Download 12.11 Kb.
Sana05.01.2022
Hajmi12.11 Kb.
#212179
Bog'liq
Daminov Uygun orta arifmetik qiymatini topish


Daminov Uyg’un O’rta arifmetik qiymatini Topish

using System;


namespace ConsoleApp16

{

class Program



{

static void Main(string[] args)

{

int n;


n = int.Parse(Console.ReadLine());
int[] a = new int[n];
double sum = 0;

for (int i = 0; i < n; i++)

{

a[i] = Convert.ToInt32(Console.ReadLine());



}

for (int i = 0; i < n; i++)

{

sum = sum + a[i];



}

Console.WriteLine(sum / n);



}

}

}
Download 12.11 Kb.

Do'stlaringiz bilan baham:




Ma'lumotlar bazasi mualliflik huquqi bilan himoyalangan ©fayllar.org 2024
ma'muriyatiga murojaat qiling