C programming validating user input Isex com chatroom

The only thing is though that when I enter a 1 to select Euro the app does absolutely nothing. If you allow scientific notation, you will also need to check for 'e', 'E', 'd' and 'D'.

c programming validating user input-24

Look up the isdigit() function, which will tell you if the character you saw was a digit from 0 to 9.

Look up the ispunct() function, which will tell you if the character you saw was punctuation.

Also, float is a very poor choice for storing currency values. 1.29 will be converted into 1 (or perhaps an error will be raised).

I guess that only allowing integral values would be bad for the purpose of the assignment, but I do not know for sure.

I have been unsuccessful in doing this so I decided to start over. If any further information is needed please let me know. My problem has been is validating user input and how to go about it. Since its definition of "flush" is to complete the writing of buffered characters (not to discard them), discarding unread input would not be an analogous meaning for fflush on input streams. The user will be presented with a list of 5 selections they can make.

Last modified 06-Feb-2020 04:14