Page 1 of 1

Write a function that takes in eight (8) integers representing a DLSU ID number. The function should return a value of e

Posted: Fri May 20, 2022 9:49 am
by answerhappygod
Write A Function That Takes In Eight 8 Integers Representing A Dlsu Id Number The Function Should Return A Value Of E 1
Write A Function That Takes In Eight 8 Integers Representing A Dlsu Id Number The Function Should Return A Value Of E 1 (59.2 KiB) Viewed 58 times
Write a function that takes in eight (8) integers representing a DLSU ID number. The function should return a value of either 1 or 0 depending on the validity of the ID number inputted. 1 VALID O NOT VALID The validity of the ID number can be checked by multiplying the first digit by 8, the second digit by 7, and so on until you multiply the last digit by 1. Take the sum of all these products and if the sum is divisible by 11, the ID number is valid. Example: 11106301 -> 1"8+1"7+1*6 + 0*5+64 +3+3+ 0*2+11 = 55 VALID 12112345 >18+2+7+146+145+2*4+3 3+42 +51 63 | NOT VALID Demonstrate that your function is working by using two (2) test cases: Test Case ID Number: 12345678 Test Case 2 Your own DLSU ID Number In your main function, using conditional statements, show in the prompt if the ID number is VALID or NOT VALID. You will use the output of your function as an argument for your conditional statement.