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

RESTful APIs with CRUD Operations in Laravel 12| (2025)

  RESTful APIs serve as the foundation of modern web development. They follow a set of rules called Representational State Transfer (REST) t...

Powered by Blogger.