Click here to Skip to main content
16,015,414 members
Home / Discussions / Algorithms
   

Algorithms

 
QuestionCopying a module [modified] Pin
Cyclone0220-Oct-06 5:46
Cyclone0220-Oct-06 5:46 
AnswerRe: Copying a module Pin
El Corazon21-Oct-06 9:52
El Corazon21-Oct-06 9:52 
AnswerRe: Copying a module Pin
Eric Dahlvang26-Oct-06 8:59
Eric Dahlvang26-Oct-06 8:59 
QuestionApriori algorithm of association rules Pin
cannielynn19-Oct-06 16:26
cannielynn19-Oct-06 16:26 
Questionmodulus. need help (visual c++) Pin
nonadoes18-Oct-06 20:50
nonadoes18-Oct-06 20:50 
AnswerRe: modulus. need help (visual c++) Pin
El Corazon19-Oct-06 4:11
El Corazon19-Oct-06 4:11 
AnswerRe: modulus. need help (visual c++) Pin
David Crow26-Oct-06 9:08
David Crow26-Oct-06 9:08 
AnswerRe: modulus. need help (visual c++) Pin
PICguy4-Jan-07 16:41
PICguy4-Jan-07 16:41 
Consider a string of decimal digits of arbitrary length. These digits are some arbitrarily large number. To find num%m ...

Temp = high order digit % m
Then for each succeeding digit compute...
Temp = (Temp*10+next digit) % m

But you seem to have a more basic problem that has nothing to do with C++ or any specific language. You are letting ASCII representation get in the way of the simple algorithm to perform modulus operations on large numbers. It could be that this exercise was more to teach you about ASCII representation than modulus arithmetic. All you need to do is to subtract 0x30 (48 decimal) from each byte as you take each digit into the large number modulus algorithm I gave above.

This looks like it might be homework. If you still a problem with this after 2.5 months then find something else to study.
QuestionHardware serial encryptor/decryptor Pin
Cyclone0217-Oct-06 19:03
Cyclone0217-Oct-06 19:03 
AnswerRe: Hardware serial encryptor/decryptor Pin
tydok18-Oct-06 3:03
tydok18-Oct-06 3:03 
GeneralRe: Hardware serial encryptor/decryptor Pin
Cyclone0218-Oct-06 3:27
Cyclone0218-Oct-06 3:27 
AnswerRe: Hardware serial encryptor/decryptor Pin
El Corazon18-Oct-06 6:00
El Corazon18-Oct-06 6:00 
GeneralRe: Hardware serial encryptor/decryptor Pin
Cyclone0219-Oct-06 4:02
Cyclone0219-Oct-06 4:02 
GeneralRe: Hardware serial encryptor/decryptor Pin
El Corazon19-Oct-06 4:07
El Corazon19-Oct-06 4:07 
Questionhow to make a faster algorithm Pin
roberto_santinni17-Oct-06 11:12
roberto_santinni17-Oct-06 11:12 
AnswerRe: how to make a faster algorithm Pin
ejuanpp17-Oct-06 12:27
ejuanpp17-Oct-06 12:27 
JokeRe: how to make a faster algorithm Pin
toxcct17-Oct-06 12:46
toxcct17-Oct-06 12:46 
AnswerRe: how to make a faster algorithm Pin
Haoman1718-Oct-06 1:17
Haoman1718-Oct-06 1:17 
GeneralRe: how to make a faster algorithm Pin
peterchen21-Oct-06 12:27
peterchen21-Oct-06 12:27 
GeneralRe: how to make a faster algorithm Pin
Haoman1722-Oct-06 7:58
Haoman1722-Oct-06 7:58 
AnswerRe: how to make a faster algorithm Pin
Rob Graham21-Oct-06 13:52
Rob Graham21-Oct-06 13:52 
AnswerRe: how to make a faster algorithm Pin
Xint026-Oct-06 16:50
Xint026-Oct-06 16:50 
QuestionWhat is the 13th root of . . . Pin
Bassam Abdul-Baki17-Oct-06 3:59
professionalBassam Abdul-Baki17-Oct-06 3:59 
QuestionHow to draw thick lines using Bresenham's Algorithm? Pin
Arun Chakaravarthy16-Oct-06 23:28
Arun Chakaravarthy16-Oct-06 23:28 
QuestionRUNGE-KUTTA ALGORITH FOR SECOND-ORDER ODE Pin
sahoong15-Oct-06 6:58
sahoong15-Oct-06 6:58 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.