Posted by anisht_india on 21:12:00 05-28-2003
HEY EVERYONE .... CAN ANYONE GIVE ME SOME IDEAS ABOUT THIS PROGRAM.....
HOW TO ADD TWO 200 DIGIT NUMBERS....
Posted by Neu[Mann] on 21:36:00 05-28-2003
HELLO!
I CAN ANSWER YOU BUT YOU SHOULDN'T BE SHOUTING LIKE THAT. WE ARE ON A PUBLIC FORUM YOU KNOW, NOT IN THE MIDDLE OF THE DESERT!
hrm...
Java has a BigInteger (or BigSomething) class that I once used. They worked well. For C/C++, a quick search on the free software directory returns this:
http://www.swox.com/gmp/
Posted by anisht_india on 21:42:00 05-28-2003
sorry neu mann for that im new to this stuff....
how is the idea of storing numbers in a doubly linked list so that the size of the number becomes immaterial
[addsig]
Posted by Neu[Mann] on 22:34:00 05-28-2003
It's quite stupid because a handful of very competent programmers already coded some userful routines that allows you not to care about how big numbers are stored... I suggest you look at GMP.
If you really really want to do it yourself (perhaps for school or something) then I suppose using a linked list could do the job.
Posted by neonbjb on 13:47:00 05-30-2003
I worked on something like this once for some guy who wanted to calculate something called center numbers to massive quantities. You need to learn ASM, my man, and use the asm{
}
blocking tags in C++ and C to write what you want... other than that i dont think theres a way..
Posted by sun_vivek on 00:00:00 06-08-2003
u can make a program like that using filehandling
open files get the numbers in them
then read the file from the back and add them (u can easily read one digit at a time )if the number is greater than 10 add 1 to next addition store the result in third file ( or any one of the two files ) .
this can be a solution.
i am not too sure i will give it a try , u too do that.
Posted by Smerdyakov on 04:03:00 06-08-2003
This is a really horrible way to do something. Please don't do this, anyone.
Posted by sun_vivek on 13:41:00 06-09-2003
ya big mouth then y dont u come up with any idea