UVA 11152 Colourful Flowers Solution

Solve in C++:

//AH Tonmoy
//Department of CSE ,Islamic University
#include <bits/stdc++.h>
using namespace std;
int main()
{
 int a,b,c;
 double rs,rr,ra,vio,ros,asun,va,as,s;
 while(cin>>a>>b>>c)
 {
    s=(a+b+c)/2.0;
    vio=sqrt(s*(s-a)*(s-b)*(s-c));
    rs=(a*b*c)/(4*vio);
    as=rs*rs*acos(-1);
    asun=as-vio;
    rr=vio/s;
    ra=rr*rr*acos(-1);
    va=vio-ra;
    printf("%.4lf %.4lf %.4lf\n",asun,va,ra);
 }
return 0;

}

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.