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

Defines the entry point for the console application, Defines the entry poin...

Defines the entry point for the console application. // #include "stdafx.h" #include #include #include"conio.h" using namespace std; double Determinant(double a[][3],int forde

Heating and thermodynamic, i want software to calculate heating or use ther...

i want software to calculate heating or use thermodynamic equation , pleas help me

Explain virtual base classes, Virtual Base Classes This ambiguity can b...

Virtual Base Classes This ambiguity can be resolved if the class derived have only one copy of the class base. This can be done by making the base class a virtual class. This k

Write a program to calculate the average of ten numbers, Write a program to...

Write a program to calculate the average of ten numbers       #include stdio.h     /* Only this header is needed since only IO are used */     void main()     {          char

Write a program to add co-ordinates of the plane, Write a program to add co...

Write a program to add co-ordinates of the plane The class having x and y co-ordinates. Create three objects. Use a constructor to pass one pair of co-ordinates and a funct

Explain pros and cons of cpp as a programming language, Write a 3-4 page pa...

Write a 3-4 page paper (350 words per page) in APA format detailing the development and use of C++ in academia and in industry. Explain the pros and cons of C++ as a programming la

#superASC2 SRTING COST, A string S is said to be "Super ASCII", if it conta...

A string S is said to be "Super ASCII", if it contains the character frequency equal to their ascii values. String will contain only lower case alphabets (''a''-''z'') and the asci

Coding, padovan series with words

padovan series with words

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