Posted: Tue Dec 05, 2017 8:18 pm Post subject: Turing Asignment
Hey Guys! So I'm Not Quite Sure If I'm Allowed To Ask Help On This Website. But this is my last resort
I got assigned this question today (December 5th) And it's due (December 6th)
In the nine-digit SIN number given to each person having a job or filing an income tax return in Canada, the ninth digit is a check digit that is used to test the validity of the other digits in the SIN. The ninth digit is determined by the following procedure :
*Double the 2nd, 4th, 6th, and 8th digits;
*Add the digits of the numbers found in step a);
*Add the 1st, 3rd, 5th, and 7th digits;
*Add the numbers found in step b) and c);
*Subtract the units digit of the result of step d) from 10 and note the units digit of the result. For the SIN to be valid, its ninth digit must have this value.
Write a program that repeatedly reads SIN numbers and determines whether or not each number is a valid SIN. The program should stop when it reads the value 999999999.
Honestly, I've tried very hard to do this question but I just can't figure out why it's not working! If someone can explain to me what I have to do OR provide me the program for this question it'll be greatly appreciated. Thank You !!
Posted: Tue Dec 05, 2017 8:38 pm Post subject: RE:Turing Asignment
Also I forgot to mention. I am limited to only if Statments and loop statments, so I can't use for and all that
Posted: Tue Dec 05, 2017 10:04 pm Post subject: RE:Turing Asignment
look up the manual for "intstr" and "strint", this is what your looking for.