Large numbers

Feb 17, 2013 at 10:28pm
How would I by any means print out the result of one number being added by two numbers 999999 times, the numbers both happen to be about 16500 digits long. It must display ALL digits in the number (all the digits the result ends up being).
I know I can't use normal data-types, so what do I do?
Looks kinda like this:
1
2
3
4
5
for (int i = 0; i < 999999; ++i)
{
	total += a;
	total += b;
}

a and b being 2 different numbers with about 16500 digits.
Feb 17, 2013 at 10:35pm
See the following thread for some ideas:
http://www.cplusplus.com/forum/beginner/92051/
Feb 17, 2013 at 10:41pm
i would suggest using GMP http://gmplib.org/
Topic archived. No new replies allowed.