//使用二维数组记录地鼠的位置
//使用for循环输出二维数组内容
代码如下
#include <iostream>
using namespace std;
int main()
{
int hero[5][4] =
{
{2, 99, 98, 99},
{4, 95, 92, 85},
{6, 86, 90, 82},
{13, 97, 90, 91},
};
for ( int i = 0; i <= 3; i++ )
{
for ( int j = 0; j <= 3; j++ )
{
cout << hero[i][j] << " ";
}
cout << endl;
}
return 0;
}