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 instrument = Console.ReadLine();
- double juryScore = 0;
- double dificult = 0;
- double presentation = 0;
- if (country == "Russia")
- {
- if (instrument == "ribbin")
- {
- dificult = 9.100;
- presentation = 9.400;
- }
- else if (instrument == "hoop")
- {
- dificult = 9.300;
- presentation = 9.800;
- }
- else if (instrument == "rope")
- {
- dificult = 9.600;
- presentation = 9.000;
- }
- }
- else if (country == "Bulgaria")
- {
- if (instrument == "ribbin")
- {
- dificult = 9.600;
- presentation = 9.400;
- }
- else if (instrument == "hoop")
- {
- dificult = 9.550;
- presentation = 9.750;
- }
- else if (instrument == "rope")
- {
- dificult = 9.500;
- presentation = 9.400;
- }
- }
- else if (country == "Italy")
- {
- if (instrument == "ribbin")
- {
- dificult = 9.200;
- presentation = 9.500;
- }
- else if (instrument == "hoop")
- {
- dificult = 9.450;
- presentation = 9.350;
- }
- else if (instrument == "rope")
- {
- dificult = 9.700;
- presentation = 9.150;
- }
- }
- double finalScore = dificult + presentation;
- double maxScore = 20;
- double score = maxScore - finalScore;
- double scoreNeeded = (score / maxScore) * 100;
- Console.WriteLine($"The team of {country} get {score:f3} on {instrument}.");
- Console.WriteLine($"{scoreNeeded:f2}%");
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment