Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- import java.util.Scanner;
- public class VacationBooksList_04 {
- public static void main(String[] args) {
- Scanner scanner = new Scanner(System.in);
- //вход: брой старници(int), стр/час(int), брой дни (int)
- //1. общо часове за четене = брой страници / стр за час
- //2. часове на ден = общо часове за четене / бр.дни
- int countPages = Integer.parseInt(scanner.nextLine());
- int pagesPerHour = Integer.parseInt(scanner.nextLine());
- int countDays = Integer.parseInt(scanner.nextLine());
- int totalHours = countPages / pagesPerHour;
- int hoursPerDay = totalHours / countDays;
- System.out.println(hoursPerDay);
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement