2011-03-20 21:28
2011-03-20 21:29
2011-03-20 21:30
2011-03-20 21:43
程序代码:/*
*两个球未知球 和 两个标准求相比较
*相等返回0 未知重返回-1 标准重返回1
*/
int Compare_to_two(int unkown_x, int unkown_y, int standard_z)
{
int xy = test[unkown_x] + test[unkown_y];
if( xy == 2*test[standard_z] )
{
return 0;
}
else if( xy > 2*test[standard_z] )
{
return -1;
}
else
{
return 1;
}
}
2011-03-20 21:56
2011-03-20 21:57
2011-03-20 22:44
你测试的数据没有问题
2011-03-21 07:34