大神帮忙看下这个程序,运作为什么是这个样子

大神帮忙看下这个程序,运行为什么是这个样子
#include <stdio.h>
#include <stdlib.h>
#include <time.h>

int main()
{
int num = 0, num1 = 0, row = 0, col = 0, mox = 0, moy = 0, in = 0, in1 = 0, min = 0, max = 0;
srand(time(0));
printf("请输入次数: ");
scanf("%d", &num);
printf("***\n***\n***\n");//地图
do
{
printf("请输入锤子坐标: ");
scanf("%d%d", &in, &in1);
}while(in < 1 || in > 3 || in1 < 1 || in1 > 3);
mox = rand() % 3 + 1;
moy = rand() % 3 + 1;
for (num1 = 1; num1 <= num; num1++)
{
for(row = 0; row <= 2; row++)
{
for (col = 0;col <= 2;col++)
{
if ((in == row) && (in1 == col))
{
printf("O");
}
else if ((mox == row) && (moy == col))
{
printf("X");
}
else
{
printf("*");
}
printf("打中了");
min++;
}
printf("没打中");
max++;
}
printf("打中%d次,没打中%d次", min, max);
}
printf("\n");
return 0;
}


打印出来的结果是:
请输入次数: 2 
***
***
***
请输入锤子坐标: 2 2
*打中了*打中了*打中了没打中*打中了*打中了*打中了没打中*打中了X打中了O打中了没打中打中9次,没打中3次*打中了*打中了*打中了没打中*打中了*打中了*打中了没打中*打中了X打中了O打中了没打中打中18次,没打中6次 
------解决方案--------------------
我这里有一份   ,你照着理下逻辑 !
#include <stdio.h>
#include <stdlib.h>
#include <time.h>
int main() {
int times = 0/*游戏次数*/, mousey = 0/*老鼠所在行号*/, mousex = 0/*老鼠所在列号*/, posy = 0/*锤子所在行号*/, posx = 0/*锤子所在列号*/, hits = 0/*打中次数*/, missed = 0/*错过次数*/;
int num = 0, row = 0, col = 0;
srand(time(0));
//获得游戏次数
printf("请输入次数:");
scanf("%d", &times);
//打印地图
printf("***\n***\n***\n");
//游戏过程
for (num = 1;num <= times;num++) {
//获得老鼠和锤子的位置
        mousey = rand() % 3 + 1;
mousex = rand() % 3 + 1;
do {
    printf("请输入锤子所在的位置:");
    scanf("%d %d", &posy, &posx);
} while (posy < 1 
------解决方案--------------------
 posy > 3 
------解决方案--------------------
 posx < 1 
------解决方案--------------------
 posx > 3);
//修改打中和错过的个数
if (mousey == posy && mousex == posx) {
hits++;
}
else {
missed++;
}
//打印地图
        for (row = 1;row <= 3;row++) {
for (col = 1;col <= 3;col++) {
if (row == posy && col == posx) {
printf("O");
}
else if (row == mousey && col == mousex) {
printf("X");
}
else {
printf("*");
}
}
printf("\n");
}
//提示是否打中
if (mousey == posy && mousex == posx) {
printf("打中了\n");
}
else {
printf("没打中\n");
}
//打印总成绩
printf("打中%d次,错过%d次\n", hits, missed);
}
return 0;
}