#include <time.h>
and you should already have stdlib because of rand(). At the top at some point before line 18 call srand((unsigned)time(0));
to seed the random number generator using the current time (and converts that value to one acceptable to srand).
A couple of little things: main() should explicitly return an int, so mark it as int main(void)
and put a return 0;
at the end of your code (before the last brace of main). Also, in lines 6-11 you can use the characters (e.g., 'A' ) to make things easier to read so you won't have to remember.