Well even if those programs are credible, what are you going to do with them? I think you were asked to write a program yourself, so the first thing you should do is figure out what a valid credit card number is. Here are some links that might help.
http://en.wikipedia.org/wiki/Credit_card_n...GenCardFeatures
http://money.howstuffworks.com/credit-card2.htm
http://www.avdf.com/feb99/art_vb003.html
So figure out what it is, then once you're ready to start programming post back here and I'm sure someone will help you get started. You may as well take this opportunity to learn a thing or two, instead of googling for already written program.