///////////////////////////////////////
// 九宫图算法;
//////////////////////////////////////
#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");
}
}
创造与魔法九游版本
创造与魔法九游版采用了极致创新的魔幻游戏玩法感受,游戏具备最
疯狂医院达什医生中文版(Crazy Hospital)
疯狂医院达什医生最新版是一款医院模拟经营类游戏,逼真的场景画
宝宝庄园官方版
宝宝庄园官方版是一款超级经典好玩的模拟经营类型的手游,这个游
桃源记官方正版
桃源记是一款休闲娱乐类的水墨手绘风格打造的模拟经营手游。玩家
长途巴士模拟器手机版
长途巴士模拟器汉化版是一款十分比真好玩的大巴车模拟驾驶运营类