///////////////////////////////////////
// 九宫图算法;
//////////////////////////////////////
#include
#include
#include
//////////////////////////////////
//// the function defination
//////////////////////////////////
void create(int [][3]);
void show(int [][3]);
void set_value(int [][3]);
void aim_get(int [][3]);
void target(int [][3]);
void judge_x1(int [][3]);
void judge_x2(int [][3]);
void judge_x3(int [][3]);
void judge_x4(int [][3]);
void judge_x5(int [][3]);
void shift_all(int [][3]);
void shift_low_six(int [][3]);
void anti_shift_all(int [][3]);
void shift_low_four(int [][3]);
void last_shift(int [][3]);
void set_x5(int [][3]);
///////////////////////////////////////
////// the main function body ////
////////////////////////////////////////
main()
{
srand(time(NULL));
int cDiagram[3][3];
create(cDiagram); /////// creat the new array ,set the value are 10;
set_value(cDiagram);
//last_shift(cDiagram);
return 0;
}
///////////////////////////////////////
/// 建立一个3*3数组,初值都设为10;//
//////////////////////////////////////
void create(int array[][3])
{
printf("nn***********************************nn");
printf("九宫图算法实现过程nn");
printf("***********************************nn");
int line;
int row;
for(line=0;line<3;line++)
{
for(row=0;row<3;row++)
{
array[line][row]=10;
}
}
// set_value(array);
//show(array);
}
/////////////////////////////////////////
/// 显示数组状态 ////
////////////////////////////////////////
void show(int array[][3])
{
for(int i=0;i<3;i++)
{
for(int j=0;j<3;j++)
{
printf("%3d",array[i][j]);
}
printf("nn");
}
}
模拟极限越野
模拟极限越野开着大巴在各种奇葩路况里送乘客。山路弯道多得让人
模拟火车
模拟火车让你当回真正的火车司机,得先学会看信号灯、操作控制杆
可口的披萨美味的披萨
可口的披萨美味的披萨带您体验经营一家披萨店的乐趣。游戏画风温
定制虚拟偶像最新版
定制虚拟偶像最新版是一款超级经典有趣的日本模拟装扮类型的手游
病娇模拟器手机版正版(yandere simulator)
病娇模拟器最新版手游是一款萌妹二次元模拟游戏,玩家在游戏中可