Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- import java.util.Scanner;
- public class asd2 {
- public static void main(String[] args) {
- Scanner scanner= new Scanner(System.in);
- double Stepdance = Double.parseDouble (scanner.nextLine());
- double CountDancer = Double.parseDouble (scanner.nextLine());
- double DayStudy = Double.parseDouble (scanner.nextLine());
- double totalPStepsDay = ((Stepdance/DayStudy)/Stepdance)*100;
- double totalPerStepsDаncer = Math.ceil (totalPStepsDay) / CountDancer ; // Използвай Math.ceil за да закръглиш . Твоя код : double totalPerStepsDаncer = (totalPStepsDay/CountDancer)
- if(totalPStepsDay < 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 +"%.");
- }
- else {
- 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+"%.");
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement