Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- using System;
- namespace Loops
- {
- class Program
- {
- static void Main(string[] args)
- {
- int turniri = int.Parse(Console.ReadLine());
- int points = int.Parse(Console.ReadLine());
- int start = points;
- int wins = 0;
- for (int i = 0; i < turniri; i++)
- {
- string type = Console.ReadLine();
- switch (type)
- {
- case "W":
- points += 2000;
- wins++;
- break;
- case "SF":
- points += 720;
- break;
- case "F":
- points += 1200;
- break;
- }
- }
- double procent = (wins * 100.0) / turniri;
- double avg = Math.Floor((double)(points - start) / turniri);
- Console.WriteLine($"Final points: {points}");
- Console.WriteLine($"Average points: {avg}");
- Console.WriteLine($"{procent:F2}%");
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement