Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- import java.util.Scanner;
- public class Tuesday {
- public static void main(String[] args) {
- Scanner scanner = new Scanner(System.in);
- int steps = Integer.parseInt(scanner.nextLine()); //брой стъпки
- int dancers = Integer.parseInt(scanner.nextLine()); //танцьори
- int days = Integer.parseInt(scanner.nextLine()); //дни за учене
- double totalPR = (steps / days) / steps * 100; //общ процент стъпки на ден
- double stepsPERdancer = Math.ceil((totalPR) / dancers); //процент стъпки на танцьор
- if(totalPR<=13) {
- System.out.printf("Yes,they will succeed in that goal! " ,stepsPERdancer,'%'+".");
- }else{
- System.out.printf("No,they will not succeed in that goal! Required ",stepsPERdancer,"%% steps to be learned per day.");
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement