Hi,
I am new to programming and currently working on a project for my intro to programming class. I am trying to get a "Press any key to continue..." prompt but so far have only been able to get it to do so if you input an actual character. I do not want to use system("PAUSE") tho I know that would work. Any way to replicate the system("PAUSE") without actually using it?
Thanks,
Here is what I have thus far:
}
printf("\n Do you want to perform another calculation? (y/n)> \n\n");
while((c = getchar()) != '\n' && c != EOF);
scanf(" %c",&again);
{
if(again != 'y' || again != 'Y' || again != 'n' || again !='N'){
printf("\n\n#######Invalid Selection #######\n\n");
printf("(Error)\n\n");
}
else{
break;
}
while((getchar() == EOF));
printf("\nPess any key to continue...\n");
scanf(" %c",&id);
}
}
while (again == 'y' || again == 'Y');
return(0);
}