#include
#include
#include
const int MAX1=33;
const int MAX2=16;
void main()
{
int x[6]={0};
int y=0;
int i,j,k,r;
k=0;
srand(time(0));
while(k<6)
{
r=rand()%MAX1+1;
for(i=0;iif(x[i]==r)
break;
x[k++]=r;
}
y=rand()%MAX2+1;
for(i=0;i<6;i++)
printf("%d ",x[i]);
printf(" %d",y);
}
#include
#include
#include
int main()
{
int red[6] = { 0 };
int bule;
srand((unsigned int)time(NULL));
int temp;
for (int i = 0; i < 6; i++)
{
int j = 0;
temp = rand() % 33 + 1;
for (; j < i; j++)
{
if (temp == red[j])
{
i--;
break;
}
}
if (j==i)
{
red[i] = temp;
}
}
bule = rand() % 16 + 1;
for (int i = 0; i < 6; i++)
{
printf("%d ", red[i]);
}
printf(" %d", bule);
return 0;
}
에게 너 를 한바탕 욕설
冻僵的长虫(蛇)~~~~要死不活;死不死,活不活