Advertisement
Nixtov

Choreography

Sep 2nd, 2017
94
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Java 0.81 KB | None | 0 0
  1. import java.util.Scanner;
  2.  
  3. public class Choreography {
  4.     public static void main(String[] args) {
  5.         Scanner console = new Scanner(System.in);
  6.  
  7.         Double steps = Double.parseDouble(console.nextLine());
  8.         Double dancers = Double.parseDouble(console.nextLine());
  9.         Double days = Double.parseDouble(console.nextLine());
  10.  
  11.         Double percentStepsPerDay = Math.ceil((steps / days) / steps * 100);
  12.         double percentStepsPerDancer = percentStepsPerDay / dancers;
  13.  
  14.         if (percentStepsPerDay <= 13) {
  15.             System.out.printf("Yes, they will succeed in that goal! %.2f .", percentStepsPerDancer);
  16.         } else {
  17.             System.out.printf("No, They will not succeed in that goal! Required %.2f steps to be learned per day.", percentStepsPerDancer) ;
  18.  
  19.         }
  20.     }
  21. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement