a very difficult interview question# JobHunting - 待字闺中
d*8
1 楼
write a program, to generate a seris of numbers which are N to the power of
M, where N and M are integer that greater than 1.
The seris of the number should be in increasing order.
i.e.,
we have 2^2, 2^3, 2^4, ...
and 3^2, 3^3, 3^4, ...
and 4^2, 4^3, 4^4, ..., etc.
so the number should be generated in this order:
4, 8, 9, 16, 25, 27, 32, 36, 49, 64, 81, 100, ......
How to write the program to do this???
M, where N and M are integer that greater than 1.
The seris of the number should be in increasing order.
i.e.,
we have 2^2, 2^3, 2^4, ...
and 3^2, 3^3, 3^4, ...
and 4^2, 4^3, 4^4, ..., etc.
so the number should be generated in this order:
4, 8, 9, 16, 25, 27, 32, 36, 49, 64, 81, 100, ......
How to write the program to do this???