摘要: #include int main() { int n,i,a,j,s=0; scanf("%d",&n); n>=3&&na/2&&a!=1) { printf("%d ",a); s=s+a; }} printf("s=%d",s); return 0; } 阅读全文
posted @ 2018-10-28 18:15 MichaelCecil 阅读(1048) 评论(0) 推荐(0) 编辑
摘要: #include int main() { int n,i,j; scanf("%d",&n); n>=1&&n<=9; for(i=1;i<=n;i++) { for(j=1;j<=i;j++) { if(j==i) printf("%d*%d=%d\n",j,i,i*j);... 阅读全文
posted @ 2018-10-28 17:46 MichaelCecil 阅读(1055) 评论(0) 推荐(0) 编辑
摘要: #include int main() { int n; while(scanf("%d",&n)!=EOF){ int x1,x2,i,x; x1=1; x2=1; if(n==1) printf("1"); if(n==2) printf("1 1"); if(n>2) { printf("%d ... 阅读全文
posted @ 2018-10-28 12:53 MichaelCecil 阅读(2011) 评论(0) 推荐(0) 编辑
摘要: #include #include int main() { float x,i; scanf("%f",&x); double tmp=x,y=x; i=2; while(tmp>=0.00001) { tmp=pow(x,i); for(int k=1;k<=i;k++) tmp=tmp/k; ... 阅读全文
posted @ 2018-10-28 11:53 MichaelCecil 阅读(1937) 评论(0) 推荐(0) 编辑
摘要: #include int main() { int n,s,i; while(scanf("%d",&n)!=EOF){ s=1; for(i=n-1;i>=1;i--) { s=2*(s+1); } printf("%d",s);} return 0; } 阅读全文
posted @ 2018-10-28 10:47 MichaelCecil 阅读(737) 评论(0) 推荐(0) 编辑
摘要: #include #include int main() { int count,m,n,i; count=0; for(m=200;mn) { count++; if(count%8==1) printf("%3d",m); if(count%8!=1) ... 阅读全文
posted @ 2018-10-28 10:00 MichaelCecil 阅读(1977) 评论(0) 推荐(0) 编辑