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

VS Project, Hi, I want to get rtsp source for windows

Hi, I want to get rtsp source for windows

Program to display stock containing item code, THIS PROGRAM IS TO DISPLAY A...

THIS PROGRAM IS TO DISPLAY A STOCK CONTAINING ITEM CODE,ITEM NAME,PRICE AND ANOTHER STOCK WITH CODE & QUANTITY AND DISPLAY COMPLETE INFORMATION #include #include #include

How does c++ help with the tradeoff of security vs.usability, A: In C, enca...

A: In C, encapsulation was completed by making things static in a compilation unit or module. It prevented another module from accessing the static stuff. (Incidentally, now static

Loops, how many types of loops are there and whay are they and what are its...

how many types of loops are there and whay are they and what are its uses

Define the recursion function in c, Define the Recursion Function in C? ...

Define the Recursion Function in C? In C, it is potential for the function to call themselves a function is describing 'recursive' if a statement within the body of a function

Data type, what is virtual datatype

what is virtual datatype

Functions, differentiate between inbuilt and user defined functions

differentiate between inbuilt and user defined functions

Input and output routines, Data is required to be fed into the program (inp...

Data is required to be fed into the program (input) and sent out of the program (output). Considering the draughtsman using a CAD station, the input is his commands to cause lines/

Overloading binary operators, Overloading Binary Operators class SI ...

Overloading Binary Operators class SI {float i,p,n,r,a; public: SI(){}; SI(int gp,int gn, int gr); void putdata(void); SI operator+(SI); }; SI SI::opera

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