[ create a new paste ] login | about

Link: http://codepad.org/wanHow9s    [ raw code | output | fork ]

C, pasted on Nov 9:
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
#include <stdio.h>

int main(void){

	double min,dis,time,speed;

	printf("Time(min)=? ");
	scanf("%lf",&min);

        printf("Distance(km)=? ");
	scanf("%lf",&dis);


        time =min/60;
        speed=dis/time;

        printf("Speed(km/h):%2.1lf\n",speed);

        return 0;
}


Output:
1
Time(min)=? Distance(km)=? Speed(km/h):438261050348002404835802475068514893080568004608.0


Create a new paste based on this one


Comments: