Credit Card Validation Check digit, C/C++ Programming

Assignment Help:
Use 16 digit credit card numbers that contain 15 digits an 1 check digit. The format of the card number consists of the 15 digits followed by the check digit. The check digit is computed by adding the 15 digits and then determining what digit (0-9) would need to be added to that so the result is evenly divisible by 10. So you would need to first add up the first 15 digits and then find out which number you would have to add to make the end result divisible by 10. In the example, the first 15 digits added up equal 75 and the you would need to add 5 to give the end result 80 and 80 is evenly divisible by 10.



For example,




8546 9234 8771 452X




(X is the check digit)




Add up each digit:




8+5+4+6+9+2+3+4+8+7+7+1+4+2+5= 75




For this to be evenly divisible by 10, you would need to add 5 to make the total result equal 80. So the check digit or X would equal 5.




For this program you need to write two functions. The First function verifies that a credit card number is valid. Ignore spaces in the credit card number, but other non-numeric characters will result in the number being invalid as will fewer/more than 16 digits. Write a Second function that randomly generates a VALID card Number




Finally, write a main function that creates 10 randomly generated numbers and validates them. Next, allow the user to enter card numbers and have the program tell the user whether their card number is valid or not.

I am so lost please help

Related Discussions:- Credit Card Validation Check digit

Define a structure in c++, Define a structure in C++: Write a program ...

Define a structure in C++: Write a program a structure in c++ program. void main() {                 struct player                 {                 char name[2

Assignment help, #questionHi, I am looking for help with the assignment, ca...

#questionHi, I am looking for help with the assignment, can you help..

Required, requiredrequiredrequiredrequiredrequiredrequiredrequiredrequired

requiredrequiredrequiredrequiredrequiredrequiredrequiredrequired

The Shell or Command Line Interpreter is the fundamental Use, 1. The shell ...

1. The shell must support the following internal commands: i. cd - Change the current default directory to . If the argument is not present, report the current directory. If t

Record of student and calculating marks using ctotal, reocord of a student ...

reocord of a student and a function ctotal to calculate the marks of any three subject by using ctotal() function

Binary search tree is constructed by repeatedly, Assume that a Binary Searc...

Assume that a Binary Search Tree is constructed by repeatedly inserting exact values in to the tree. Argue that the number of nodes examined in searching for a value in the tree is

Explain the #undef directive, The #undef Directive This directive undef...

The #undef Directive This directive undefines a previously explained macro. For, example the following will give an error since PI is undefined.                 #define PI 3

System programing, #quesdifferentiate betweenrelocatable and self relocatin...

#quesdifferentiate betweenrelocatable and self relocating program with exampletion..

Member dereferencing operators, M em b e r d e r e f e r e n c ...

M em b e r d e r e f e r e n c i ng o p e r a t o r s: T h e s e op e r a t o r s w i l l b e d i s c u s s e d l a t

Draw pie chart in c++ program, Draw pie chart in c++ program: int main...

Draw pie chart in c++ program: int main() {                 char cmd;                   cout                 cout                 cmd = toupper(getch());

Write Your Message!

Captcha
Free Assignment Quote

Assured A++ Grade

Get guaranteed satisfaction & time on delivery in every assignment order you paid with us! We ensure premium quality solution document along with free turntin report!

All rights reserved! Copyrights ©2019-2020 ExpertsMind IT Educational Pvt Ltd