While Statement Issue.
Wayne,Please disregard the previous request. I found my mistake. I was doing the following: scanf("%c\n",&type). I found another error with the ordercom variable. Now the program is working...
View ArticleWhile Statement Issue.
WayneAKing,Thank you for your reply. I decided to split up the scanf into two separate requests. I though now am having problems with the input as the first scanf does not do anything after inputing...
View ArticleWhile Statement Issue.
As an aside:>scanf("%c ""%f",&type,£s); While this will work, it's not customary or necessary to split the format string into parts:"%c ""%f", ... One string will suffice:...
View ArticleWhile Statement Issue.
>the program skips over the scanf statement Try adding this statement immediately after the scanf: fflush(stdin); - Wayne
View ArticleWhile Statement Issue.
Well, usually the reason why scanf would do something like that is if there is something in the input buffer already. Scanf will only wait for input if there isn't enough input available to fill the...
View ArticleWhile Statement Issue.
In the below code I have put together a text example of a shopping cart whereby the user selects a commodity to purchase and based upon a menu selection, tells the program which leg in my switch...
View Article