Advertisement
koksibg

Choreography

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