n
printPowersOfN
that prints the powers of any given
number n up to n^x. For example, the
following call:
printPowersOfN(3, 5);should produce the following output, because 35 = 243:
1 3 9 27 81 243and the call:
printPowersOfN(2, 10);should produce the same output as
printPowersOf2(10);
:
1 2 4 8 16 32 64 128 256 512 1024