SHARE
TWEET

Untitled

a guest Mar 24th, 2019 59 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  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.                 double totalPerStepsDаncer = Math.ceil (totalPStepsDay) / CountDancer ; // Използвай Math.ceil за да закръглиш . Твоя код : double totalPerStepsDаncer = (totalPStepsDay/CountDancer)
  12.                 if(totalPStepsDay < 13){
  13.                     System.out.printf("Yes, they will succeed in that goal! %.2f%%.",totalPerStepsDаncer); // Твоя код : System.out.println("Yes, they will succeed in that goal! " + totalPerStepsDаncer +"%.");
  14.                 }
  15.                 else {
  16.                     System.out.printf("No, they will not succeed in that goal! Required %.2f%% steps to be learned per day. ",totalPerStepsDаncer); // Твоя код : System.out.printf("No, they will not succeed in that goal!,%.2f " + totalPerStepsDаncer+"%.");
  17.                 }
  18.     }
  19. }
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top