If I understand correctly, what the user types is not being stored into repeat, and so repeat is never equal to 'y' or 'Y'?
If so, the problem is that you have code that is roughly the following:
Code:
scanf("%d", &whatever);
repeat = getchar();
while ( getchar() != '\n');
So the user enters a number, and hits enter. The next call to getchar() thus returns a newline (because the user hit enter), which is assigned to repeat. Your loop then discards all user input until he hits enter again. Unless the user is doing something like entering "11y" for an answer, repeat will always contain a newline, and thus will never be 'y' or 'Y'.
User input in C is an annoying thing. For a quick fix you can replace the second two lines in the excerpt above with:
Code:
while( (repeat = getchar()) == '\n' );
This will keep reading characters until the user enters a non-newline character. repeat will contain the last character the user entered.
You'll also want to make repeat an int, not a char. Despite its name, getchar() returns an int, and for good reason: otherwise, you would not be able to reliably detect EOF—something you'll want to do, at least at some point in your future C endeavors.