#include
#define SIZE 10
int main() {
int i;
int a[SIZE]={0};
while(i==1)
a[i]=1;
for (i=2;i<=SIZE;++i) {
a[i]=2*(a[i-1]+1);
printf("a[%d]=%d\n",i,a[i]);
}
return 0;
}
#include<stdio.h>
#define SIZE 11 //修改
int main() {
int i;
int a[SIZE]={0};
//while(i==1)//修改
a[1]=1;
for (i=2;i<SIZE;++i) {//修改
a[i]=2*(a[i-1]+1);
printf("a[%d]=%d\n",i,a[i]);
}
return 0;
}