希望修正一下C语言。不知道为什么输出不了、
#include "stdlib.h"
#include"stdio.h"
#include"time.h"
void main()
{int n ,a[50],i,j,t;
srand(time (NULL));
for(i=0;i<50;i++)
{a[i]=rand()%90+10;
for(j=0;j<i-1;j++)
if (a[i]==a[j])
i--;
}
printf("nafter:\n") ;
}
你好!!
你的代码就没有输出部分呀
输出部分添加了,你看看吧
你的方法不好,给你推荐一个。
#include "stdlib.h"