Main.cs
using
System;
class
Program {
-
public
static
int
Main() {
-
decimal
[] ara =
new
decimal
[3] {10, 20, 30};
-
decimal
avg = 0;
-
for
(
int
i=0; i<ara.Length; i++) {
-
avg+=ara[i];
-
}
-
avg/=ara.Length;
-
Console.WriteLine(avg);
-
Console.ReadKey();
-
return
0;
-
}
}
using
System;
class
Program {
-
public
static
int
Main() {
-
decimal
[] ara =
new
decimal
[3] {10, 20, 30};
-
decimal
avg = 0;
-
for
(
int
i=0; i<ara.Length; i++) {
-
avg+=ara[i];
-
}
-
avg/=ara.Length;
-
Console.WriteLine(avg);
-
Console.ReadKey();
-
return
0;
-
}
}
20