Advertisement
Guest User

Untitled

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