I have an issue here. I have to make a program that checks if a credit card number is valid or not using the checksum. I'm supposed to multiply every other digit starting from the second to last digit, then add the products then add the numbers that weren't multiplied to that sum as well. The result should produce 0 when divided. However, Im having an issue here with my program. When I enter large numbers, the values change up and at the end I get Floating point exception(core dumped). When I enter smaller numbers, sometimes it works, sometimes it doesn't. Please help me out.
Thank you for your help. Please explain the issue so I can avoid it later.