| Computing.Net: Over 1,000,000 posts about all things technology related! Over 90% answered within 24 hours! Click here to sign up now, it's free! |
Help with C++ and Mod 11 program
|
Original Message
|
Name: Mercutio
Date: February 17, 2003 at 04:08:20 Pacific
Subject: Help with C++ and Mod 11 program OS: Win XP CPU/Ram: 1.3ghz
|
Comment: Hi Guys, I need a wee bit of help with a project I am working on. Part of it involves writing a Modulus 11 check which is causing me no end of trouble. I have made several attempts at trying to write the Mod 11 check but it keeps coming up with errors...or rather, lack of errors. Basically, the program takes data from from a disk and checks that the 5 digit customer number successfully passes the mod 11 check. If the customer number does NOT check out correctly then the program will record that entry as an error and write it to another file to be processed later. The problem I am having is that all the customer numbers I have chosen at random seem to pass the mod 11 check even when they are incorrect. If anyone is able to offer some tips on how to write a fully functioning mod 11 check I would be very grateful as I am running low on hair to rip out in frustration. :)
Report Offensive Message For Removal
|
|
Response Number 1
|
Name: Ronin1
Date: February 18, 2003 at 16:50:39 Pacific
|
Reply: (edit)? for(int i=1; i [ 300; i++) { if((i % 11) == 0) cout [[ i [[ " passes mod 11 test" [[ endl; } see what that does. :)
Report Offensive Follow Up For Removal
|

Post Locked
This post is quite old and has been locked from receiving new replies. Please create a new posting instead.
Go to Programming Forum Home