#include<stdio.h> #include<time.h> int main(void) { char a[]="0123456789abcdefghijklmnorstuvwxyz"; char b[7]; int i,j=0; while(j<7) { srand(time(NULL)+i); i=rand()%37; b[j]=a[i]; j++; } b[j]='\0'; puts(b); return 0; }