Lecture Notes on 20 Sep 2013 Problem Decomposition # Prompt user to enter credit card number Set cc to that number Convert to integer # Extract digits of the cc Set d16 to cc % 10 Set new_cc to cc // 10 Set d15 to new_cc % 10 ... # Multiply odd digits by 2 Set d15 to d15 * 2 Set d15 to d15 % 10 + d15 // 10 # Sum all digits Set sum_digits to sum of all digits # Test if sum_digits is divisible by 10 if sum_digits is divisible by 10 then print valid credit card else print invalid credit card endif