I am experiencing a problem with turbo c while I execute odd loops. The compiler doesnt wait till I give a yes or a no. It just jumps out of the loop. Can anyone help me?Is it a problem with the compiler or my program. The latter is not possible since I tried out a similar program from a book and got similar results. I have Turbo C v3.0 downloaded from the internet.Also, the compiler doesn't seem to understand getch and clrscr functions.
Program was;
#include<stdio.h>
void main()
{
int i;
char q='y';
while(q=='y')
{
printf("Enter the number");
scanf("%d",&i);
printf("The number you have entered is %d",i);
printf("Want to enter another number y/n\n")
scanf("%c",&q);
}
}