Advertisement
GabrielHr00

04. Vacation Books List

Jan 5th, 2025
148
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Java 0.51 KB | None | 0 0
  1. import java.util.Scanner;
  2.  
  3. public class VacationBooksList {
  4.     public static void main(String[] args) {
  5.         Scanner scanner = new Scanner(System.in);
  6.         int pagesCount = Integer.parseInt(scanner.nextLine());
  7.         int pagesPerHour = Integer.parseInt(scanner.nextLine());
  8.         int daysCount = Integer.parseInt(scanner.nextLine());
  9.  
  10.         int allHoursToRead = pagesCount / pagesPerHour;
  11.         int hoursPerDay = allHoursToRead / daysCount;
  12.  
  13.         System.out.println(hoursPerDay);
  14.     }
  15. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement