#include <stdio.h>
#include <stdlib.h>
#include <time.h>
int main()
{
int lotto[6]={0};
int n;
int m;
srand(time(NULL));
for(n=0;n<6;n++)
{lotto[n]=rand()%45+1;
for(m=0;m<n;m++)
{
if(lotto[n]=lotto[m])
{
lotto[n]=rand()%45+1;
m=0;
}
}
}
printf(\"%d,%d,%d,%d,%d,%d\",lotto[0],lotto[1],lotto[2],lotto[3],lotto[4],lotto[5]);
}
이거 뭐가문제인가요? ;
컴파일하니까
Permission denied
ld returned 1 exit status
라고 밑에 뜨고
실행하니까 아무것도 안되네요 ..
#include <stdlib.h>
#include <time.h>
int main()
{
int lotto[6]={0};
int n;
int m;
srand(time(NULL));
for(n=0;n<6;n++)
{lotto[n]=rand()%45+1;
for(m=0;m<n;m++)
{
if(lotto[n]=lotto[m])
{
lotto[n]=rand()%45+1;
m=0;
}
}
}
printf(\"%d,%d,%d,%d,%d,%d\",lotto[0],lotto[1],lotto[2],lotto[3],lotto[4],lotto[5]);
}
이거 뭐가문제인가요? ;
컴파일하니까
Permission denied
ld returned 1 exit status
라고 밑에 뜨고
실행하니까 아무것도 안되네요 ..
다른건 모르겟고 if 안에 = 임