Pages

Sunday 22 December 2013

UVA - 12704 - Little Masters

#include <stdio.h>
#include <stdlib.h>
#include <ctype.h>
#include <math.h>

int main()
{
    int n=0;
    scanf("%d",&n);
    while(n--){
        float x=0,y=0,r=0;
        scanf("%f %f %f",&x,&y,&r);
        double s=sqrt(x*x+y*y);
        printf("%.2f %.2f\n",r-s,r+s);
    }
    return 0;
}

No comments:

Post a Comment