Ask Question
21 February, 06:47

Given the variables costOfBusRental and maxBusRiders of type int, write an expression corresponding to the cost per rider (assuming the bus is full). (Do not worry about any fractional part of the expression- - let integer arithmetic, with truncation, act here.)

+5
Answers (1)
  1. 21 February, 07:41
    0
    int costOfBusRental;

    int maxBusRiders;

    int costPerRider;

    costPerRider = costOfBusRental/maxBusRiders;

    Explanation:

    The costPerRider is the total cost of renting the bus (costofBusRental) divided by all the bus users (maxBusRiders). So we declare the three variables to be of type int as required by the question.
Know the Answer?
Not Sure About the Answer?
Find an answer to your question ✅ “Given the variables costOfBusRental and maxBusRiders of type int, write an expression corresponding to the cost per rider (assuming the bus ...” in 📘 Computers and Technology if you're in doubt about the correctness of the answers or there's no answer, then try to use the smart search and find answers to the similar questions.
Search for Other Answers