Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- package Exam23July2017;
- import java.util.Scanner;
- public class Demo1 {
- public static void main(String[] args) {
- Scanner scanner = new Scanner(System.in);
- double StepNumber = Double.parseDouble(scanner.nextLine());
- double DancerNumber = Double.parseDouble(scanner.nextLine());
- double LerningDays = Double.parseDouble(scanner.nextLine());
- double DaysStep = Math.ceil((StepNumber / LerningDays) / StepNumber * 100);
- double DancerStep = (DaysStep / DancerNumber);
- if (DaysStep <= 13){
- System.out.printf("Yes, they will succeed in that goal! %.2f%%. ",DancerStep);
- } else {
- System.out.printf("No, They will not succeed in that goal! Required %.2f%% steps to be learned per day.", DancerStep);
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement