Answer to Question #42869 in C for mouza

Question #42869
Write a c program that reads a credit card number from the user. The c program will display:
Valid: if the credit card is valid
Invalid: if the credit card is invalid
The program will also display the type of the credit card according to the starting digit
(1st digit from left to right). The credit card number must start with:
3 for American Express
4 for Visa
5 for MasterCard
6 for Discover Card

The total number of digits of a credit card number must be between 13 to 16 digits. In addition, your program should validate credit card numbers according to Luhn Rule that is basically can be described as follows (as an illustration, the rules will be applied to the credit card number 4388576018402626):

you have to use user-defined functions

& thanku
0
Expert's answer

Answer in progress...

Need a fast expert's response?

Submit order

and get a quick answer at the best price

for any assignment or question with DETAILED EXPLANATIONS!

Comments

No comments. Be the first!

Leave a comment

LATEST TUTORIALS
APPROVED BY CLIENTS