Advertisement
Spocoman

Choreography

Oct 9th, 2023
992
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C# 0.81 KB | None | 0 0
  1. using System;
  2.  
  3. namespace Choreography
  4. {
  5.     class Program
  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.  
  13.             double dayStepPercent = Math.Ceiling((double)steps / days / steps * 100);
  14.             double dancerStepPercent = dayStepPercent / dancers;
  15.  
  16.             if (dayStepPercent < 13)
  17.             {
  18.                 Console.WriteLine($"Yes, they will succeed in that goal! {dancerStepPercent:f2}%.");
  19.             }
  20.             else
  21.             {
  22.                 Console.WriteLine($"No, they will not succeed in that goal! Required {dancerStepPercent:f2}% steps to be learned per day.");
  23.             }
  24.         }
  25.     }
  26. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement