摘要: 单层金字塔 #include<stdio.h>int main(){ int n,i,t,j; while(scanf("%d",&n)!=EOF) { for(j=1;j<=n;j++) { for(t=1;t<=n-j;t++) {printf(" ");} for(t=1;t<=2*j-1;t 阅读全文
posted @ 2017-11-25 02:28 鸵鸟tang 阅读(145) 评论(0) 推荐(0) 编辑
摘要: #include<stdio.h>int main(){ int n,i,s; while(scanf("%d",&n)!=EOF) { s=1; for(i=1;i<n;i++) {s=(s+1)*2;} printf("%d\n",s); } return 0;} 阅读全文
posted @ 2017-11-25 02:23 鸵鸟tang 阅读(179) 评论(0) 推荐(0) 编辑