PGhosh

Runrate

Apr 9th, 2014
201
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C 0.48 KB | None | 0 0
  1. #include <stdio.h>
  2.  
  3. int main()
  4. {
  5.     double x, opprun,myrun,bremeaning,bplayed,target,runremeaning,runrate,reqrate;;
  6.     scanf("%lf", &x);
  7.     while(x>0){
  8.         x--;
  9.         scanf("%lf %lf %lf", &opprun, &myrun, &bremeaning);
  10.         bplayed=300-bremeaning;
  11.         runrate=(myrun/bplayed)*6;
  12.         target=opprun+1;
  13.         runremeaning=target-myrun;
  14.         reqrate=(runremeaning/bremeaning)*6;
  15.         printf("%0.2lf %0.2lf", runrate, reqrate);
  16.  
  17.     }
  18.     return 0;
  19. }
Advertisement
Add Comment
Please, Sign In to add comment