Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- using System;
- namespace FootballLeague
- {
- class Program
- {
- static void Main(string[] args)
- {
- int stadiumCapacity = int.Parse(Console.ReadLine());
- int footballFens = int.Parse(Console.ReadLine());
- double sectorA = 0;
- double sectorB = 0;
- double sectorV = 0;
- double sectorG = 0;
- for (int i = 2; i <= footballFens + 1; i++)
- {
- string input = Console.ReadLine();
- if (input == "A")
- {
- sectorA++;
- }
- else if (input == "B")
- {
- sectorB++;
- }
- else if (input == "V")
- {
- sectorV++;
- }
- else if (input == "G")
- {
- sectorG++;
- }
- }
- Console.WriteLine($"{sectorA / footballFens * 100:f2}");
- Console.WriteLine($"{sectorB / footballFens * 100:f2}");
- Console.WriteLine($"{sectorV / footballFens * 100:f2}");
- Console.WriteLine($"{sectorG / footballFens * 100:f2}");
- Console.WriteLine($"{footballFens / stadiumCapacity * 100:f2}");
- }
- }
- }
Add Comment
Please, Sign In to add comment