0
Can anyone help me solve a C language problem?
A taxi charge P2.50 for the first 300 meters and P2.00 for every 200 meters thereafter. Any distance covering the next 200 meter zone is still charged P 2.00. Make a program that would input the Distance a trip took and output the Fee.
2 Antworten
+ 1
C has the following conditional statements:
- Use if to specify a block of code to be executed, if a specified condition is true
- Use else to specify a block of code to be executed, if the same condition is false
- Use else if to specify a new condition to test, if the first condition is false
- Use switch to specify many alternative blocks of code to be executed.
You can use these statements to perform different actions for different decisions.
If you need some further help let show us your attempt on Sololearns playground.
0
What is your attempt? Link it via code bit.