I am a math geek and I love doing math. Problem-solving math that is. Go to artofproblemsolving.com for more info. I also love computers. So, I thought how about a marathon for programming problems? I'm talking about mathematics based problems not projects like making a program to transfer files over a network. Solve the problems using C. Post the code here and if you solve a problem, you have to supply a new one. It'd be fun if we would gradually increase in difficulty.
A person will be best friends with another person if their SSN's give the same mod 47 residues (for this problem SSN's will be only 6 digits). Write a program that takes in 12 digit numbers which consist 6 digits of one person and 6 digits of another and it has to output whether the two people will be best friends or not.