Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- import java.util.Scanner;
- public class Main {
- public static void main(String[] args) {
- Scanner scanner = new Scanner(System.in);
- int steps = Integer.parseInt(scanner.nextLine()),
- dancers = Integer.parseInt(scanner.nextLine()),
- days = Integer.parseInt(scanner.nextLine());
- double dayStepPercent = Math.ceil((double) steps / days / steps * 100),
- dancerStepPercent = dayStepPercent / dancers;
- if (dayStepPercent < 13) {
- System.out.printf("Yes, they will succeed in that goal! %.2f%%.\n", dancerStepPercent);
- } else {
- System.out.printf("No, they will not succeed in that goal! Required %.2f%% steps to be learned per day.\n", dancerStepPercent);
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement