1043 – Triangle Partitioning

Problem Link

 

#Solution

#include <stdio.h>
#include <math.h>
int main()
{
int t;
scanf(“%d”,&t);
float a,b,c,ratio;
int i;
for(i =0; i<t; i++)
{

scanf(“%f%f%f%f”,&a,&b,&c,&ratio);
float ans=ratio/(ratio+1);
printf(“Case %d: %f\n”,i+1,sqrt(ans)*a);

}

return 0;

}

Advertisements

About waprogramming

I am in CSE,from CUET
This entry was posted in Uncategorized. Bookmark the permalink.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s