Follows 10195.c (Total 20 lines):

/* @JUDGE_ID:4461XX 10195 C "math formula" */
/* A */
#include<stdio.h>
#include<math.h>

int main( void )
{
	double a , b , c , s , area ;
	
	while( scanf( "%lf %lf %lf" , &a , &b , &c )==3 ){
		s = ( a+b+c )*0.5 ;
		area = sqrt( s*( s-a )*( s-b )*( s-c ) ) ;

		printf( "The radius of the round table is: " ) ;
		if ( area<0.00001 ) printf ( "0.000\n" ) ;
		else printf ( "%.3lf\n", area/s ) ;
	}

	return 0 ;
}

Back to statistics
Ya-Lin Huang (C)
huangyl@gmail.com