Credit Card Validation

This program is about validating whether a credit card number is correct or incorrect. In this program is prompts the user to input a text file where the credit card companys and card numbers are stored. It runs the list of credit card numbers and takes it through a series of three checks. The program checks for three things, the length, prefix, and luhns algorithm. The length determines whether the credit card length it valid for a specific credit card company. The prefix also is checked for a specific credit card company. It takes the first digit or the second digit and determines whether it corresponds with the credit card company. Last but not least, we have Luhn’s algorithm. Luhn’s algorithm takes each digit from a credit card number and multiplies every other number from left to right, by 2. Then it takes each digit of a number greater than 9 and adds that to the sum of numbers that weren’t multiplied by 2 and less than 10. It then determines whether the total summation is divisible by 10. If so, then it returns a true value and the whole credit card number is valid. If a check is wrong it will state that in the output.

In this program I learned to create functions outside of main and call them into main. I also learned how to open a file in my program. Coding has become more clear to me as I begin to program. My programs have become more comprehensive and organized. I was also able to interpret it into a real world scenario. Upon doing this, I learned that coding is beyond just input and output statements. They are functions and algorithms meant to be processed.

Leave a Reply

Your email address will not be published. Required fields are marked *

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>

A Mind Of An Individual

css.php