Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- import java.util.Scanner;
- public class Reception {
- public static void main(String[] args) {
- Scanner scanner = new Scanner(System.in);
- int employeesOne = Integer.parseInt(scanner.nextLine());
- int employeesTwo = Integer.parseInt(scanner.nextLine());
- int employeesThree = Integer.parseInt(scanner.nextLine());
- int studentCount = Integer.parseInt(scanner.nextLine());
- double neededHours = 0;
- double answerPerHour = employeesOne + employeesTwo + employeesThree;
- while (studentCount > 0){
- studentCount -= answerPerHour;
- neededHours++;
- if (neededHours % 4 == 0) ;
- neededHours++;
- System.out.printf("Time needed: %f", answerPerHour);
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement