UVA 12578 - 10:6:2


Solve in C:

#include<stdio.h>
#include<math.h>
int main()
{

    int i,n;
    double aa,ga,ra,w,r,l;
    scanf("%d",&n);
    while(n--)
        {
            scanf("%lf",&l);
            w=(l*6)/10.0;
            aa=l*w;
            r=l/5.0;
            ra=(M_PI*r)*r;
            ga=aa-ra;
            printf("%.2lf %.2lf\n",ra,ga);
        }

}

No comments

Most View Post

Recent post

Codeforces Round 925 (Div. 3) 1931D. Divisible Pairs Solution

    Problem Link  :   https://codeforces.com/contest/1931/problem/D S olution in C++: /// Author : AH_Tonmoy #include < bits / stdc ++. ...

Powered by Blogger.