Advertisement
veronikaaa86

04. Vacation Books List

Oct 31st, 2021
178
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.54 KB | None | 0 0
  1. package firstSteps;
  2.  
  3. import java.util.Scanner;
  4.  
  5. public class P04VacationBooksList {
  6. public static void main(String[] args) {
  7. Scanner scanner = new Scanner(System.in);
  8.  
  9. int countPages = Integer.parseInt(scanner.nextLine());
  10. int readPagesPerHour = Integer.parseInt(scanner.nextLine());
  11. int days = Integer.parseInt(scanner.nextLine());
  12.  
  13. int totalReadingHours = countPages / readPagesPerHour;
  14. int hoursPerDay = totalReadingHours / days;
  15.  
  16. System.out.println(hoursPerDay);
  17. }
  18. }
  19.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement