+ 1

Please help me solve for this. The user can only select 5 choices but should not exceed which means multiple choices is allowed

Im stuck it gives me an error The vehicles are in full tank and also must be returned in full tank. A deposit of P10, 000.00 pesos for vehicle rented is needed and will be deducted from the total amount that the customer will pay. The rental fee is charged per day and the driver for hire is priced at P1, 500.00 pesos per day. it must compute and display the total expenses for the payment and the amount that each user will pay. Also, break down and display fuel consumption and the expenses such as fuel cost, rental cost, etc. (**Assumption: The travel is roundtrip (starting point to destination and vice versa) every day. The starting point is Bacolod City; destination is given above. Ex. 163 km *2= 50km https://code.sololearn.com/c6chuoNE97ic/?ref=app

6th Dec 2021, 10:18 AM
shlee_
5 Respostas
+ 1
Angelo How about the calculations for he multiple choices related for number of day trips and distance of each place selected by the user I don't know how to mange this in the code
6th Dec 2021, 12:36 PM
shlee_
0
What are you trying to do with place [] = "..."; ?
6th Dec 2021, 11:02 AM
Angelo
0
Angelo I wanted to display all the chosen places of the user on the last part of my program Also I'm concerned with the calculations related to multiple choices and number of day trips
6th Dec 2021, 11:04 AM
shlee_
0
So, what you want to do is to declare const char* places[5]; and an index int p_i=0; And than places[p_i] = "..."; // set (p_i)th place ++p_i; // increment p_i For displaying just put at the end puts(places[i]) for i from 0 to 5 (with a for-loop)
6th Dec 2021, 11:09 AM
Angelo
0
Angelo I'm more concerned with the calculations too I'm get stuck with it
6th Dec 2021, 11:46 AM
shlee_