Advertisement
Guest User

Untitled

a guest
Aug 4th, 2020
133
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Java 0.73 KB | None | 0 0
  1. import java.util.Scanner;
  2.  
  3. public class Reception {
  4.     public static void main(String[] args) {
  5.         Scanner scanner = new Scanner(System.in);
  6.  
  7.         int employeesOne = Integer.parseInt(scanner.nextLine());
  8.         int employeesTwo = Integer.parseInt(scanner.nextLine());
  9.         int employeesThree = Integer.parseInt(scanner.nextLine());
  10.  
  11.         int allStudents = 0;
  12.  
  13.         int studentsHour = 0;
  14.  
  15.         double neededTime = employeesOne + employeesTwo + employeesThree;
  16.  
  17.         while (allStudents > 0) {
  18.  
  19.             if (allStudents % 4 == 0) {
  20.                 allStudents -= studentsHour;
  21.                 continue;
  22.  
  23.             }
  24.         }
  25.         System.out.printf("Time needed: %f.", neededTime);
  26.     }
  27. }
  28.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement