baekjoon 20260301
This commit is contained in:
parent
701f8df09d
commit
b0d806cacb
22
code_study/Baekjoon/c/2765.c
Normal file
22
code_study/Baekjoon/c/2765.c
Normal file
@ -0,0 +1,22 @@
|
|||||||
|
#include <stdio.h>
|
||||||
|
#include <math.h>
|
||||||
|
|
||||||
|
double pi = 3.1415927;
|
||||||
|
double convFactor = 1.0 / (5280*12);
|
||||||
|
|
||||||
|
int main() {
|
||||||
|
double r, rev, sec, dist, MPH;
|
||||||
|
int t = 1;
|
||||||
|
|
||||||
|
while(1) {
|
||||||
|
scanf("%lf %lf %lf", &r, &rev, &sec);
|
||||||
|
if(rev == 0) break;
|
||||||
|
|
||||||
|
dist = rev * r * pi * convFactor;
|
||||||
|
MPH = dist * 3600 / sec;
|
||||||
|
|
||||||
|
printf("Trip #%d: %.2lf %.2lf\n", t++, dist, MPH);
|
||||||
|
}
|
||||||
|
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
Loading…
x
Reference in New Issue
Block a user