Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- using System;
- public class Program
- {
- public static void Main()
- {
- Console.WriteLine("Избери брой оценки: ");
- int n = int.Parse(Console.ReadLine());
- double[] ocenki = new double[n];
- for(int i = 0; i < ocenki.Length; i++)
- {
- Console.WriteLine("Въведи оценка {0}", i);
- ocenki[i] = double.Parse(Console.ReadLine());
- }
- double sym = 0;
- for(int i = 0; i < ocenki.Length; i++)
- {
- sym += ocenki[i];
- }
- double avg = sym / ocenki.Length;
- Console.WriteLine("Средният успех е {0:f2}", avg);
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement