it still acting strange and i cant put the zero in for while it just ends.
heres what happens
------
[Session started at 2007-11-05 20:02:45 -0500.]
you want to do this y, n:y
you want to do this y, n:you want to do this y, n:y
you want to do this y, n:you want to do this y, n:n
assinment 4b has exited with status 0.
------
and heres the code
Code:
char menu(void) {
char x;
printf("\nyou want to do this y, n:"); /* this will move the question, one line down */
scanf("%c",&x);
return x;
}
int main (void)
{
char play;
while(1) { ///i changes it 1 i wouldent work as 0.
play=menu();
if(play=='n')
break;
}