Advertisement
SIRAKOV4444

Untitled

Mar 27th, 2019
163
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.91 KB | None | 0 0
  1. import java.util.Scanner;
  2.  
  3. public class Tuesday {
  4. public static void main(String[] args) {
  5.  
  6. Scanner scanner = new Scanner(System.in);
  7.  
  8. int steps = Integer.parseInt(scanner.nextLine()); //брой стъпки
  9. int dancers = Integer.parseInt(scanner.nextLine()); //танцьори
  10. int days = Integer.parseInt(scanner.nextLine()); //дни за учене
  11.  
  12. double totalPR = (steps / days) / steps * 100; //общ процент стъпки на ден
  13. double stepsPERdancer = Math.ceil((totalPR) / dancers); //процент стъпки на танцьор
  14.  
  15. if(totalPR<=13) {
  16. System.out.printf("Yes,they will succeed in that goal! " ,stepsPERdancer,'%'+".");
  17. }else{
  18. System.out.printf("No,they will not succeed in that goal! Required ",stepsPERdancer,"%% steps to be learned per day.");
  19. }
  20. }
  21. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement