Nackey

Choreography-p2

Aug 21st, 2017
242
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Java 0.74 KB | None | 0 0
  1. import java.util.Scanner;
  2.  
  3. public class july232017p2 {
  4.     public static void main(String[] args) {
  5.         Scanner sc = new Scanner(System.in);
  6.  
  7.         double steps = Double.parseDouble(sc.nextLine());
  8.         double dancers = Double.parseDouble(sc.nextLine());
  9.         double days = Double.parseDouble(sc.nextLine());
  10.  
  11.         double stepsByDay = Math.ceil((steps/days)/steps*100);
  12.         double stepsPerDancer = stepsByDay/dancers;
  13.  
  14.         if (stepsPerDancer <= 13){
  15.             System.out.printf("Yes, they will succeed in that goal! %.2f%%.",stepsPerDancer);
  16.         }else{
  17.             System.out.printf("No, They will not succeed in that goal! Required %.2f%% steps to be learned per day.",stepsPerDancer);
  18.         }
  19.     }
  20. }
Advertisement
Add Comment
Please, Sign In to add comment