Old snapshot `BigInteger-2004.12.16'; see the ChangeLog file.
[bigint/bigint.git] / PowersOfThreeDemo.cpp
1 #include <string>
2 #include <iostream>
3 #include "BigUnsigned.h"
4 #include "BigInteger.h"
5 #include "BigIntegerIO.h"
6
7 int main() {
8         std::cout << "POWERS OF THREE DEMO" << std::endl;
9         std::cout << "Uses Matt McCutchen's Big Integer Library" << std::endl;
10         
11         BigUnsigned x(1), three(3);
12         for (int power = 0; power <= 500; power++) {
13                 std::cout << "3^" << power << " = " << x << std::endl;
14                 x *= three;
15         }
16         
17         return 0;
18 }