Advertisement
desislava_topuzakova

Untitled

Jan 25th, 2018
206
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.80 KB | None | 0 0
  1. import java.util.Scanner;
  2.  
  3. public class Choreography {
  4. public static void main(String[] args) {
  5. Scanner scn = new Scanner(System.in);
  6. double stepNumber=Double.parseDouble(scn.nextLine());
  7. double dancersNumber=Double.parseDouble(scn.nextLine());
  8. double daysNumber=Double.parseDouble(scn.nextLine());
  9.  
  10. double stepsPerDay=((stepNumber/daysNumber)/stepNumber)*100;
  11. double result=Math.ceil(stepsPerDay);
  12. result =result/dancersNumber;
  13.  
  14. if(stepsPerDay<13)
  15. System.out.printf("Yes, they will succeed in that goal! %.2f%c.",result,'\u0025');
  16. else
  17. System.out.printf("No, They will not succeed in that goal! Required %.2f%c steps to be learned per day.",result,'\u0025');
  18. scn.close();
  19.  
  20. }
  21. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement