problem with while loop

hi all,
i have written the following code:
while(proceed !='Y' && proceed!='N' && proceed!='y' && proceed!='n')
{

		printf\("\\nPress \\n\\t 'Y' or 'y' to continue \\n\\t 'N' or 'n' to cancel:"\);
		scanf\("%c",&proceed\);
\}

the output i am gettin is:

Press
'Y' to continue
'N' to cancel
: a
Press
'Y' to continue
'N' to cancel
: (not allowing me to enter the value here and directly printing once more.)
Press
'Y' to continue
'N' to cancel
: b
Press
'Y' to continue
'N' to cancel
:
Press
'Y' to continue
'N' to cancel
:

why is this happening can nyone help me with this??

thanx

You did not just type an "a". You typed an "a" followed by a newline character. Try typing "unix" and watch what happens. This is one of several reason why I do not like scanf. What is worse here, you do not need scanf for anything. I would define a character array called inputline to be 80 characters. Then I would use fgets (never use gets) to read a line of input. Finally just "proceed=inputline[0]" to get the first character and discard the rest of the line.