PTA c语言 7-1 求幂之和
#include<stdio.h>int main () { int n = 0; int sum = 0; if(scanf("%d",&n)){};//这里是因为pta的scanf会报错 for(int i = 1;i<=n;i++) { sum += pow(2,i); } printf("result = %d",sum); return 0;}...