Advertisement
desislava_topuzakova

Untitled

Jan 25th, 2018
184
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.86 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.  
  12. double dailySteps = ((steps / days) /steps)*100;
  13. dailySteps = Math.ceil(dailySteps);
  14. double stepPerDancer = dailySteps / dancers;
  15. String percent = "%";
  16.  
  17. if(dailySteps <= 13) {
  18. System.out.printf("Yes, they will succeed in that goal! %.2f%s.", stepPerDancer,percent);
  19. }else{
  20. System.out.printf("No, They will not succeed in that goal! Required %.2f%s steps to be learned per day.",stepPerDancer, percent);
  21. }
  22. }
  23. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement