#include using namespace std; int main() { int _T; scanf("%d", &_T); while(_T--) { int W, B, C; scanf("%d %d %d", &W, &B, &C); if(C == 1) { printf("%.3f\n", ((float)W)/(W+B)); } else if(W == 0) { printf("0.000\n"); } else { if(W < C) { printf("%.3f\n", ((float)W)/C); } else { double first = ((double)(C-1))/C; double second = ((double)(W-C+1)); double third = ((W-C+1+B)*C); printf("%lf %lf\n", first, second/third); printf("%.3lf\n", first+second/third); } } } return 0; }