Basically, if the user enters any of the following strings:
"3e343" - "ww3" - "2.2.2" - "33 44" - "fafa" - "+" - "-" - "324+1"
They would get, "Invalid entry, please enter numerical values only"
On the other hand, if the user enters any of the following:
"343" - "-3242" - "+3242"...
User Profile
Collapse
-
I used if statements to check for different conditions, but, my if statement is getting way too large.Leave a comment:
-
-
c function/code to test number
So I am reading in a number from a string.
I need to check if that number is valid.
Invalid examples: "3e343" - "ww3" - "2.2.2" - "33 44" - "fafa" - "+" - "-" - "324+1"
Valid examples: "343" - "-3242" - "+3242"
Thanks!
No activity results to display
Show More
Leave a comment: