#include <stdio.h>
#include <stdlib.h>
int randReturn(int maxRand)
{
static int comp = 0;
int temp;
while(1)
{
temp = rand() % (maxRand + 1);
if(!(comp & (1 << temp)))
{
comp |= (1 << temp);
break;
}
}
return temp; }
int main()
{
int randomNum[3][3];
int comp = 0;
int i,j,temp;
for(i = 0; i < 3; i++)
{
for(j = 0; j < 3; j++)
{
temp = randReturn(8);
randomNum[i][j] = temp;
printf("%d ", randomNum[i][j]);
}
printf(" %d\n",comp);
}
return 0;
}
9개의 댓글
무분별한 사용은 차단될 수 있습니다.
센타까
#include
#include
int randReturn(int maxRand)
{
static int comp = 0;
int temp;
while(1)
{
temp = rand() % (maxRand + 1);
if(!(comp & (1
센타까
"
센타까
댓글에 < 두개 연속으로 들어가면 뒤가 다 짤린다 ㅠ
센타까
게시글로는 다 나오네
Tbps
XSS때문에 막은거니 어쩔 수 없지뭐...
00KB 이상 리사이징
& l t ; 로 치환해서 올려
00KB 이상 리사이징
<
센타까
오 된다 ㄳㄳ
센타까
<<