//产生0,1两个随机数
#include<iostream>
#include <math.h>
using namespace std ;
int main()
{
int a[16][16];
int i = 0 ,j = 0 ;
for ( i = 0 ;i < 16 ;i ++)
for ( j = 0 ;j <16; j++)
a[i][j] = (int)rand()%2;
for (i = 0 ;i < 16 ;i ++)
for ( j = 0 ;j <16; j++)
cout<<a[i][j] <<" ";
return 0 ;
}
温馨提示:内容为网友见解,仅供参考