PGhosh

new C Code 2

Apr 4th, 2014
176
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. #include <stdio.h>
  2.  
  3. int main()
  4. {
  5.     double R,B,runrate, x=1, T;
  6.     scanf("%lf", &T);
  7.     while(T>0){
  8.         scanf("%lf %lf", &R, &B);
  9.         runrate=(R/B)*6;
  10.         printf("Case %0.0lf: %0.2lf", x++, runrate);
  11.         T--;
  12.     }
  13.     if(B==0){
  14.         printf("1");
  15.     }
  16.     return 0;
  17. }
Advertisement
Add Comment
Please, Sign In to add comment