small error, not sure why.
Program is to read the first line of .txt file and set it at min and max and after that it should TEST to see if it is a number within that range if not should show up as invalid.
However it doesnt work properly (01_num executes but last number doesnt work, and 02_num doesnt execute at all )
Check attachments for the project file + two files to test with
to execute run it like ./01_Input < [login to view URL]
Hi, your code was assuming that every provided line starts with a digit. I have added additional checks and modified the code to show reason for "Invalid" state. Please initiate Freelancer chat so i can send you a screenshot with output for your example files.
Hello,
I'm not sure what language your code is (I'm mainly specialized in Visual Basic). But based on your explanation I would guess that your code crashes whenever it encounters a non-numeric value. My suggestion would be to add some code that checks whether or not your entry is a numeric value (in VB.NET it is done with the function 'IsNumeric'; I'm not sure what the equivalent is in the language you are using). I think this would solve your problem.
Regards
Wesley