Quantcast
Channel: While Statement Issue.
Browsing all 7 articles
Browse latest View live

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 Article



While Statement Issue.

Show the code you are now using to get input. - Wayne

View Article

While 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 Article

While Statement Issue.

As an aside:>scanf("%c ""%f",&type,&pounds); While this will work, it's not customary or necessary to split the format string into parts:"%c ""%f", ... One string will suffice:...

View Article

While Statement Issue.

>the program skips over the scanf statement Try adding this statement immediately after the scanf: fflush(stdin); - Wayne

View Article


While 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 Article

While 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
Browsing all 7 articles
Browse latest View live




Latest Images