Advertisement
veronikaaa86

Choreography1

Nov 1st, 2017
248
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Java 0.90 KB | None | 0 0
  1. package Exam23July2017;
  2.  
  3. import java.util.Scanner;
  4.  
  5. public class P02_Choreography {
  6.     public static void main(String[] args) {
  7.         Scanner scanner = new Scanner(System.in);
  8.  
  9.         int countSteps = Integer.parseInt(scanner.nextLine());
  10.         int countDancers = Integer.parseInt(scanner.nextLine());
  11.         int countDays = Integer.parseInt(scanner.nextLine());
  12.  
  13.         double dailySteps = ((countSteps/countDays)/(countSteps*1.0));
  14.         double percentDailySteps = Math.ceil(dailySteps*100);
  15.         double percentStepsDancer = percentDailySteps/countDancers;
  16.  
  17.         if (percentDailySteps<=13) {
  18.             System.out.printf("Yes, they will succeed in that goal! %.2f%%.", percentStepsDancer);
  19.         }else {
  20.             System.out.printf("No, They will not succeed in that goal! Required %.2f%% steps to be learned per day.",
  21.                     percentStepsDancer);
  22.         }
  23.     }
  24. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement