提示:
奇数项:前一项的2次方
偶数项:2的递增倍数
#include<stdio.h>
#include<math.h>
int main(){
int a=2,b=2;
long long n;//奇数项
int i=1;//偶数项2的乘数
int count=0;//便于换行
do{
printf("%20d",b);
i++;//乘数++
b=2*i;//偶数项
count++;
n=a; //奇数项
printf("%20lld",n);
count++;
a=pow(n,2); //超出一定值将无效
if(count%4==0) printf("\n");
}while(count<=20);
return 0;
}