标签:break == style printf display div image for scanf
main() { int sum,i; sum=0; i=1; while(i<=100) { sum=sum+i; i++; } printf("sum=%d\n",sum); }
main() { int sum,i; sum=0; i=1; do { sum=sum+i; i++; }while(i<=100); printf("sum=%d\n",sum); }
main() { int sum,i; sum=0; for(i=1;i<=100;i++) sum=sum+i; printf("sum=%d\n",sum); }
main() { int i,m; scanf("%d",&m); for(i=2;i<=m-1;i++) { if(m%2==0) break; } if(i<=m-1) printf("该数不是素数!\n"); else printf("该数是素数!\n"); }
main() { int i; scanf("%d",&m); for(i=100;i<=200;i++) { if(i%3==0) continue; printf("%d ",i); } }
标签:break == style printf display div image for scanf
原文地址:http://www.cnblogs.com/gaiyin/p/6882888.html