Problem Solving | Sololearn: Learn to code for FREE!

+1

Problem Solving

Parking Fee You are making a car parking software that needs to calculate and output the amount due based on the number of hours the car was parked. The fee is calculated based on the following price structure: - the first 5 hours are billed at $1 per hour. - after that, each hour is billed at $0.5 per hour. - for each 24 hours, there is a flat fee of $15. This means, that, for example, if a car parked for 26 hours, the bill should be 15+(2*0.5) = 16.0, because it was parked for 24 hours plus 2 additional hours. Sample Input: 8 Sample Output: 6.5

1/2/2022 12:17:26 PM

Habeeb Abdulwaheed

3 Answers

New Answer

+5

Habeeb Abdulwaheed , can you please post your attempt here so that we can give you helpful hints? thanks!

+1

Ok it will be posted for others to see

0

https://code.sololearn.com/Wv5gTHy1N6Ji/?ref=app https://www.sololearn.com/Content-Creation-Guidelines? https://code.sololearn.com/Wv5gTHy1N6Ji/?ref=app https://www.sololearn.com/discuss/1316935/?ref=app https://code.sololearn.com/W3uiji9X28C1/?ref=app https://www.sololearn.com/discuss/333866/?ref=app