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