Advertisement
bbelevski

Untitled

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