Advertisement
desislava_topuzakova

Choreography

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