UVA Problem 10286 (Trouble with a Pentagon) Solution

Problem Solving, UVa

 

#include <bits/stdc++.h>

#include <math.h>

#define pi acos(0.0)

//#define pi 3.1416

int main()

{

double n;



while(scanf("%lf",&n) != EOF )

{

    //poligon_inte_angle = (3/5)*180=(108 degree)as figure sides n=5;

    //square_inte_angle  = (2/4)*90=(63 degree) as figure sides n=4;

printf("%.10lf\n",( n*sin(108*pi/90 ) / sin(63*pi/90) ));//* pi/90



}



return 0;

}

 

0 Comments

You may find interest following article

Complete Guide: Create Laravel Project in Docker Without Local Dependencies

Create Laravel Project Through Docker — No Need to Install PHP, MySQL, or Apache on Your Local Machine In this tutorial, I’ll show you how to create and run a full Laravel project using Docker containers. That means you won’t have to install PHP, MySQL, or Apache locally on your computer. By the end of this guide, you’ll have a fully functional Laravel development...