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