Ok, I need to make a program that randomly generates 4 random letters from 12 random letter and it cannot reapeat the same letter. for example you can only pick from a,b,c,d,e,f,g,h,i,j,k,l and the program can randomly generate a,b,c,d or b,c,d,e but should not generate a,a,b,b or something that repeats.Another is that a letter represents 1 animal. I'm new to rand() and srand() so any links on rand() srand() tutorial may help too. :)
#include<stdio.h>
#include<stdlib.h>
int main()
{
char a=ant,b=bear,c=cat,d=dog,
e=emu,g=goat,l=lizard,m=monkey,
p=parrot,r=rabbit,s=snake,t=tiger;
int i;
for(i=1,i<=4,i++)
{printf("%c %c %c %c",&i &i &i &i);
system("pause");
return 0;
}
so far I made these but I don't know how and where to add rand and srand()and it ca't be compiled as well. I'm not sure if the a=ant thing is correct as well.