Advertisement
noshin98

uva 12502

Jul 10th, 2016
363
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C 0.31 KB | None | 0 0
  1. #include<stdio.h>
  2. #include <math.h>
  3. int main()
  4. {
  5.     int a,b,c,n,e,d;
  6.     scanf("%d",&n);
  7.         while(n--)
  8.         {
  9.            scanf("%d%d%d",&a,&b,&c);
  10.            e=c*(a+(a-b))/(a+b);
  11.            if(e<=0)
  12.            printf("0n");
  13.            else
  14.            printf("%dn",e);
  15.         }
  16.     return 0;
  17. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement