#include <stdio.h>
#include <stdlib.h>
int power(int base, int power){
int result, i;
result = 1;
for (i=0; i < power; i++){
result *= base;
}/*for*/
return result;
}/*power*/
int main (){
int n = 0;
int exponent = 0;
while(n < 10){
int answer = power(2, n);
float neganswer = 1.0 / (power(2,n));
printf("%d %d %g\n", exponent, answer, neganswer);
exponent++;
n++;
}/*while*/
return EXIT_SUCCESS;
}/*main*/
当该程序运行时,第二个函数从 1 变为 512,这会将其余列向右移动 2。我将如何排列这些列?谢谢。