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)

Recommended Answers

All 5 Replies

You need to show some work at least. What have you done so far?

#include<stdio.h>
 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;
     time=distance/rate;
     
     float amount;
     
     amount=time*0.075;
     
     printf("Total Amount: ", amount);
     
     getchar();
     return 0;
 }

you miss the %f sign shauzi

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

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.

commented: Mor than right! +9

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

and thank you Momerath you are so right

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.