Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- using System;
- namespace Gymnastics
- {
- class Program
- {
- static void Main(string[] args)
- {
- string country = Console.ReadLine();
- string device = Console.ReadLine();
- double difficulty = 0;
- double performance = 0;
- if (country == "Russia")
- {
- if (device == "ribbon")
- {
- difficulty = 9.100;
- performance = 9.400;
- }
- else if (device == "hoop")
- {
- difficulty = 9.300;
- performance = 9.800;
- }
- else if (device == "rope")
- {
- difficulty = 9.600;
- performance = 9.000;
- }
- }
- else if (country == "Bulgaria")
- {
- if (device == "ribbon")
- {
- difficulty = 9.600;
- performance = 9.400;
- }
- else if (device == "hoop")
- {
- difficulty = 9.550;
- performance = 9.750;
- }
- else if (device == "rope")
- {
- difficulty = 9.500;
- performance = 9.400;
- }
- }
- else if (country == "Italy")
- {
- if (device == "ribbon")
- {
- difficulty = 9.200;
- performance = 9.500;
- }
- else if (device == "hoop")
- {
- difficulty = 9.450;
- performance = 9.350;
- }
- else if (device == "rope")
- {
- difficulty = 9.700;
- performance = 9.150;
- }
- }
- double score = difficulty + performance;
- Console.WriteLine($"The team of {country} get {score:f3} on {device}.");
- Console.WriteLine($"{(20 - score) / 20 * 100:f2}%");
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement