View difference between Paste ID: mY8vC6D9 and QKTDaSAt
SHOW: | | - or go back to the newest paste.
1
#include <stdio.h>
2
3
int main()
4
{
5-
    int a,b,x=1,T,runrate;
5+
    double R,B,runrate, x=1, T;
6-
    scanf("%d", &T);
6+
    scanf("%lf", &T);
7
    while(T>0){
8-
        scanf("%d %d", &a, &b);
8+
        scanf("%lf %lf", &R, &B);
9-
        runrate=(a/b)*6;
9+
        runrate=(R/B)*6;
10-
        printf("Case %d: %d", x++, runrate);
10+
        printf("Case %0.0lf: %0.2lf", x++, runrate);
11
        T--;
12
    }
13
    if(B==0){
14
        printf("1");
15
    }
16
    return 0;
17
}