Thursday, July 28, 2011

Distance Travelled

#include<stdio.h>
void main()

{
float dist,time,speed;
clrscr();
printf("Enter time in hrs and speed in km/hr\n");
scanf("%f%f",&time,&speed);
dist=time*speed;
printf("Distance travelled = %f KM",dist);
getch();
}

0 comments:

Post a Comment