yeah, but the problem is...
thanks for the reply. So basically the answer to my query was the function 'getchar()'. I tried this function in program1 shown below and it worked fine, but when i used it in my real program below, it doesnt work at all. why is this?
program1
------------
Code:
main()
{
printf("hit enter...");
getchar();
}
real program
----------------
Code:
switch(choice)
{
case 1: {
system("cls");
printf("\n");
printf("Conversion: Metres --> Kilometres\n");
printf("-----------------------------------\n");
printf("Please enter Metres: "); scanf("%d",&metres);
while (metres < 0)
{
printf("\n");
printf("Invalid Length! Please re-enter Length:"); scanf("%d", &metres);
}
kilometres = (metres * METRE_TO_KILOM);
printf("\n");
printf("%d metres = %d kilometres",metres, kilometres);
printf("\nPress [Enter] to continue...");
getchar();
}; break;