.. (לתיקייה המכילה) | ||
In question 3 can I assume that the user enter 9 digit without checking? | |
Yes. |
So why should I define it? | |
First, this is the correct way to use numbers in code. Second, it may be changed in future HWs. And third, if you want to print "Please enter a credit number with 9 digits" it should be like this, printf("Please enter a credit number with %d digits", NUM_LENGTH); |
In question 4, can the error be negative? | |
Yes, a little correction: E(x) = P'(x) - P'h(x) and the error in the example should be negative (-0.056003) and not as it is appeared in the HW. |
Example for valid and not valid credit card numbers (9 digits) for question 3. | |
458012341 is a valid one. 458012340, 458012342, 458012343, ... , 458012349 all of that are NOT valid. |