Hi,
My below code compiles and builds ok but it behaves a bit unexpected.
Please see my comment where I am having the problem. Any advice will be highly appreciated.
while(count<9)
{
system("cls");
printf("\n\n\n");
printf("\t\t\t PURCHASE ORDER SYSTEM \n\n\n\n\n\n\n\n\n\n\n");
printf("\t\t\t\t INPUT NEW ORDER DETAILS MENU\n\n\n\n\n\n");
printf("PLEASE SELECT ONE OF THE GIVEN OPTIONS: \n\n\n\n");
printf("1) ENTER NEW STYLE DETAILS \n");
printf("2) BACK TO PREVIOUS MENU \n");
fgets(userInput, sizeof(userInput), stdin);
choiceMenuInput=atoi(userInput);
printf("%d",choiceMenuInput);
if(choiceMenuInput==1)
// THE CODE IS SUPPOSE TO CHECK CHOICEMENUINPUT AND EXECUTE ACCORDINGLY BUT HE FIRST TIME YOU EXECUTE IT GOES TO THE LAST ELSE.
input();
else if(choiceMenuInput==2)
return 0;
else
printf("\n\n\n\n\n ERROR YOU HAVE ENTERED A WRONG CHOICE\n\n\n");
system("pause");
// IT COMES HERE WHILE EXECUTING.
inputedit();
}