Advertisement
veronikaaa86

Choreography

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