Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- 3.1
- int n;
- Console.Write("Podaj wielkosc zbioru: ");
- n = Convert.ToInt32(Console.ReadLine());
- int suma_zbioru = 0;
- for(int x = 0; x < n; x++){
- Console.Write("Podaj liczbe: ");
- suma_zbioru += Convert.ToInt32(Console.ReadLine());
- Console.WriteLine("");
- }
- double sa;
- sa = suma_zbioru/n;
- Console.WriteLine("Srednia arytmetyczna zbioru wynosi: "+sa);
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement