///////////////////////////////////////
// 九宫图算法;
//////////////////////////////////////
#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");
}
}
我的世界国际版老版
我的世界国际版正式版是一款拥有超高自由度玩法是沙盒手游,经典
我的世界国际版完整版
我的世界国际服完整版是一款十分经典好玩的mc沙盒类游戏,在海
摩托车销售模拟器内置菜单中文版
摩托车出售模拟器,又名摩托车销售模拟器,这是一个以摩托车销售
船舶模拟2020最新版
船舶模拟2020是玩法非常有意思的模拟驾驶游戏,高清3d画质
油管主播的生活2内置菜单版
油管主播的生活2内置菜单版是一款模拟养成类游戏,在这里你将体