PL/SQL Check Digit, luhn using MOD 11
问题 So here is the question: Write code to take in an id and determine if the check digit is correct UPDATED CODE: Set SERVEROUTPUT ON DECLARE val_num NUMBER := '&user_input'; holder NUMBER := 0; y NUMBER := 0; conv_string VARCHAR2(20); BEGIN conv_string := to_char(val_num*10); for x in 1..length(conv_string) loop y := to_number(substr(conv_string, -x, 1)); if mod(x,2) = 0 then y := y * 2; if y > 9 then y := y - 9; end if; end if; holder := holder + y; end loop; dbms_output.put_line ('Check is '|