Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- using System;
- namespace Zadacha1
- {
- class Program
- {
- static void Main(string[] args)
- {
- int broiAgenti = int.Parse(Console.ReadLine());
- decimal obshto = 0;
- for (int i = 0; i < broiAgenti; i++)
- {
- int broiSdelki = int.Parse(Console.ReadLine());
- for (int j = 0; j < broiSdelki; j++)
- {
- decimal kvadratura = decimal.Parse(Console.ReadLine());
- decimal cena = decimal.Parse(Console.ReadLine());
- obshto = obshto + (kvadratura * cena);
- }
- }
- decimal sredno = obshto / broiAgenti;
- Console.WriteLine("{0:F3}",sredno);
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement