Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- import java.util.Scanner;
- public class Choreography {
- public static void main(String[] args) {
- Scanner console = new Scanner(System.in);
- Double steps = Double.parseDouble(console.nextLine());
- Double dancers = Double.parseDouble(console.nextLine());
- Double days = Double.parseDouble(console.nextLine());
- Double percentStepsPerDay = Math.ceil((steps / days) / steps * 100);
- double percentStepsPerDancer = percentStepsPerDay / dancers;
- if (percentStepsPerDay <= 13) {
- System.out.printf("Yes, they will succeed in that goal! %.2f .", percentStepsPerDancer);
- } else {
- System.out.printf("No, They will not succeed in that goal! Required %.2f steps to be learned per day.", percentStepsPerDancer) ;
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement