Advertisement
Guest User

Untitled

a guest
Mar 24th, 2019
89
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Java 1.04 KB | None | 0 0
  1. import java.util.Scanner;
  2.  
  3. public class asd2 {
  4.     public static void main(String[] args) {
  5.                 Scanner scanner= new Scanner(System.in);
  6.                 double Stepdance = Double.parseDouble (scanner.nextLine());
  7.                 double CountDancer = Double.parseDouble (scanner.nextLine());
  8.                 double DayStudy = Double.parseDouble (scanner.nextLine());
  9.  
  10.                 double totalPStepsDay = ((Stepdance/DayStudy)/Stepdance)*100;
  11.                 //System.out.printf("%.2f%n", totalPStepsDay);
  12.                 double totalPerStepsDаncer = Math.ceil (totalPStepsDay) / CountDancer ;
  13.                 //System.out.printf("%.2f%n",totalPerStepsDаncer);
  14.  
  15.                 if(totalPStepsDay < 13){
  16.                     System.out.printf("Yes, they will succeed in that goal! %.2f%%.",totalPerStepsDаncer);
  17.  
  18.                 }
  19.                 else {
  20.                     System.out.printf("No, they will not succeed in that goal! Required %.2f%% steps to be learned per day. ",totalPerStepsDаncer);
  21.                 }
  22.     }
  23. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement