can I use the height of the pentagon to define the side length ???
code :
Code: Select all
#include <math.h>
#include <stdio.h>
int main ( void )
{
long double s , output , pi = 3.1415926535897932384626433832795 ;
/* freopen ( "10286.in" , "r" , stdin ) ;
freopen ( "10286.out" , "w" , stdout ) ;*/
while ( scanf ( "%Lf" , &s ) != EOF )
{
output = ( s * sin ( 36 * pi / 180 ) + s * cos ( 18 * pi / 180 ) ) / sqrt ( 2 ) ;
printf ( "%.10Lf\n" , output ) ;
}
return 0 ;
}