A company that issues check-cashing cards uses an algorithm to create card numbers. The algorithm adds the digits of a…