im begginer of c language n working on turbo now days,please tell me how can i repeat a program after run one time.
i use while but on press any key this program run every time no exit.please correct it ##
main()
{
char again='y';
while(again=='y'||again=='Y')
{
int a,b;
clrscr();
printf("Enter your 1st number ");
scanf("%d",&a);
printf("Enter your 2nd number ");
scanf("%d",&b);
printf("Sum is: %d",a+b);
printf("Want again? y for Yes or n for Not");
getch();
}}