Question
A Palestinian identity card number is a number given to every Palestinian citizen on the day of his birth. This number is a unique value,
A Palestinian identity card number is a number given to every Palestinian citizen on the day of his birth. This number is a unique value, and each person in Palestine holds a unique ID, unique value, which cannot be given to anyone other than him. When the computer entered government ministries and the Interior Ministry in particular, it was necessary to avoid typing errors of ID number. To this end, the critique story was created, a story that sits on the right side of the number, and represents the result of some computational algorithm. When a typing error occurs, the computer program alerts you and the typed number is corrected accordingly. Algorithm: Checking the integrity of the audit report A. Write the ID number in 9 digits, if the ID number is less than 9 digits, complete leading zeros on the left side of the number 0 1 2 3 4 5 6 7 4 B. Below each digit of the ID number, write from the right side of the number the digits 1, then 2, then again 1, then again 2 and repeat until the end. These numbers are called weights. 0 1 2 3 4 5 6 7 4 1 2 1 2 1 2 1 2 1 C. Multiply by an abbreviated multiplication, without bearing any digit in the ID number with the digit below it (weight). The result, even if it is in two digits, is written below a third line. 0 1 2 3 4 5 6 7 4 1 2 1 2 1 2 1 2 1
0 2 2 6 4 10 6 14 4 D. The results become the results of one digit. For example, if a result is a two-digit number, add all the digits of the number to one digit. For example, add the result 14 as 4 and another 1, and get 5. The result 10 add about 1 and another 0 and get 1. All the results are written in a fourth row. 0 1 2 3 4 5 6 7 4 1 2 1 2 1 2 1 2 1
0 2 2 6 4 10 6 14 4 0 2 2 6 4 1 6 5 4 E. Now, connect all the digits in a simple arithmetic addition until a result is obtained. The result must be a number divisible by 10 with no remainder, meaning that its unity number is 0. 0 1 2 3 4 5 6 7 4 1 2 1 2 1 2 1 2 1
0 2 2 6 4 10 6 14 4 0 2 2 6 4 1 6 5 4
0 + 2 + 2 + 6 + 4 + 1 + 6 + 5 + 4 = 30 F. A result that is not divisible by 10 with no remainder indicates a number that is incorrect within the ID number (typing incorrectly, for example). A result that is divisible by 10 with no residual indicates a valid ID number.
General Comments: A. The user should be instructed as to what input is expected of him, and that informative output should be presented. B. When you need to display a number of data in some row in the output separate them using a single space. C. Maintain a programming style, especially: 1. Documentation of all its components. 2. Layout. 3. Variable names.
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started