Advertisement
ktopchiev

Choreography

Dec 5th, 2017
379
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C# 0.97 KB | None | 0 0
  1. using System;
  2. using System.Collections.Generic;
  3. using System.Linq;
  4. using System.Text;
  5. using System.Threading.Tasks;
  6.  
  7. namespace Choreography
  8. {
  9.     class Program
  10.     {
  11.         static void Main(string[] args)
  12.         {
  13.             double steps = double.Parse(Console.ReadLine());
  14.             double dancers = double.Parse(Console.ReadLine());
  15.             double days = double.Parse(Console.ReadLine());
  16.  
  17.             double dailySteps = ((steps / days) / steps) * 100;
  18.             dailySteps = Math.Ceiling(dailySteps);
  19.             double stepsPerDancer = dailySteps / dancers;
  20.  
  21.             if(dailySteps <= 13)
  22.             {
  23.                 Console.WriteLine($"Yes, they will succeed in that goal! {stepsPerDancer:F2}%.");
  24.             }
  25.             else if(dailySteps > 13)
  26.             {
  27.                 Console.WriteLine($"No, They will not succeed in that goal! Required {stepsPerDancer:F2}% steps to be learned per day.");
  28.             }
  29.         }  
  30.     }      
  31. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement