Hi There PLease i Need Help>>>> :)

can any one Write me a program to do the following..?PLzzz

It costs 1.500$ for each 20 minutes traveled by taxi. Enter the rate at which the driver is driving along with the distance that is to be traveled then calculate the amount that must be paid and print the result on the screen. use the formula: Distance = rate * time..

That's It I know that it's simple but am new at programing so i need help thanxx..

by the way * means times (multiplication)

6 Years
Discussion Span
Last Post by nory22
 int main () 
     float rate=0;
     float distance=0;
     printf("Enter The Rate at which the driver is driving: ");
     scanf("%f", &rate );
     printf("Enter The Distance that have been traveled: ");
     scanf("%f", &distance);
     float time;
     float amount;
     printf("Total Amount: ", amount);
     return 0;

you miss the %f sign shauzi

printf("Total Amount: %f", amount);

Edited by slygoth: n/a


You shouldn't do peoples homework for them. They learn nothing from it and someday they might be your coworker and you don't want to be doing all their work for them and yours.

Votes + Comments
Mor than right!

thank u all for your help Thnxxxx shauzi158 for your help.......

and thank you Momerath you are so right

This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.