Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- // Shavit Borisov
- // HW
- import java.util.Scanner;
- public class Taxi {
- public static void main(String[] args)
- {
- Scanner in = new Scanner (System.in);
- System.out.println("Enter the number of people waiting for a taxi:");
- int people = in.nextInt();
- System.out.println("Enter the number of seats in the taxi:");
- int seats = in.nextInt();
- int fullTaxies = people/seats;
- int leftOverPeople = people%seats;
- System.out.printf("%d taxies are full. %d people are left over.", fullTaxies, leftOverPeople);
- in.close();
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment