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();
- if (type == "W")
- {
- points += 2000;
- wins++;
- }
- else if (type == "SF")
- {
- points += 720;
- }
- else if (type == "F")
- {
- points += 1200;
- }
- }
- 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