Which of the following variables would C interpret as "true"? For example, if each variable was placed in the following code’s if statement as "variable", would the program output "True" or "False"?
If you cannot see this codecast, please click here.
Check Your UnderstandingCheck Your Understanding
1.
You are writing a C program that calculates the price of a rental car, depending on how many miles the user wants to drive. If the user drives less than 50 miles then the price of the car is a flat fee of $40. If on the other hand the user drives 50 or more miles, then the cost is computed as $0.70 per mile plus a handling fee of $5.
Please complete the following C program: After the user has entered the number of miles they wish to drive, the program should output the price of the rental car in dollars (with two decimal places).