-->
当前位置:首页 > 题库

PROGRAMMING:Generating the power table of 2

Luz5年前 (2021-05-10)题库376
Enter a non negative integer $$n $, generate a power table of 2, and output the value of $$2 ^ 0 $$~ $$2 ^ n $$. The power function can be called to calculate the power of 2.
###Input format:
The input gives a non negative integer $$n $$in one line.
###Output format:
Output $$n + 1 $$lines in the order of increasing power. The format of each line is "pow (2, I) = the value of I power of 2". Please note that there is a space on the left and right of the equal sign. The topic guarantees that the calculation result does not exceed the range of integer values.
###Input example:
```in
three
```
####Output example:
```out
pow(2,0) = 1
pow(2,1) = 2
pow(2,2) = 4
pow(2,3) = 8
```







answer:If there is no answer, please comment