Ask Question
31 October, 18:13

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.)

+4
Answers (1)
  1. 31 October, 18:25
    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 & Technology if the answers seem to be not correct or there’s no answer. Try a smart search to find answers to similar questions.
Search for Other Answers