Follows 190.c (Total 72 lines):

/* @JUDGE_ID:4461XX 190 C */
/* A */
#include<stdio.h>
#include<math.h>
float xy[3][2] , arr[4][3][3] , c , d , e , h , k , r ;
void pon( float i )
{
	if( i > 0 )
		printf( "+ %.3f" , i ) ;
	else
		printf( "- %.3f" , -i ) ;
}
void pri( void )
{
	printf( "(x " ) ;
	pon( h ) ;
	printf( ")^2 + (y " ) ;
	pon( k ) ;
	printf( ")^2 = %.3f^2\n" , r ) ;
	printf( "x^2 + y^2 " ) ;
	pon( c ) ;
	printf( "x " ) ;
	pon( d ) ;
	printf( "y " ) ;
	pon( e ) ;
	printf( " = 0\n\n" ) ;
}
float det( int i )
{
	float ans=0.0 , time[2] ;
	int j , k ;
	for( k=0 ; k<3 ; k++ ){
		for( j=0 , time[0]=1.0 ,time[1]=1.0 ; j<3 ; j++ ){
			time[0] *= arr[i][j][(j+k)%3] ;
			time[1] *= arr[i][j][(2+k-j)%3] ;
		}
		ans += time[0] ;
		ans -= time[1] ;
	}
	return ans ;
}
void cde( void )
{
	float xxyy ;
	xxyy = det( 0 ) ;
	d = det( 2 ) / xxyy ;
	c = - det( 1 ) / xxyy ;
	e = - det( 3 ) / xxyy ;
	h = c / (float)2 ;
	k = d / (float)2 ;
	r = sqrt( h*h + k*k - e ) ;
}
void put( void )
{
	int i ;
	for( i=0 ; i<3 ; i++ ){
		arr[2][i][2] = arr[1][i][2] = arr[0][i][2] = 1 ;
		arr[3][i][1] = arr[2][i][1] = arr[0][i][0] = xy[i][0] ;
		arr[3][i][2] = arr[1][i][1] = arr[0][i][1] = xy[i][1] ;
		arr[3][i][0] = arr[2][i][0] = arr[1][i][0] = xy[i][0]*xy[i][0] + xy[i][1]*xy[i][1] ;
	}
}
void main( void )
{
	int i ;
	while( scanf( "%f %f" , &xy[0][0] , &xy[0][1] ) == 2 ){
		for( i=1 ; i<3 ; i++ ) scanf( "%f %f" , &xy[i][0] , &xy[i][1] ) ;
		put() ;
		cde() ;
		pri() ;
	}
}

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