杭电1000-1007 完全用C编写,全部通过的.docVIP

  • 7
  • 0
  • 约1.25万字
  • 约 21页
  • 2016-12-03 发布于河南
  • 举报

杭电1000-1007 完全用C编写,全部通过的.doc

杭电1000-1007 完全用C编写,全部通过的

杭电1000-1007 完全用C编写,全部通过的 1000 #includestdio.h void main(void) { int a,b; while(scanf(%d %d,a,b)!=EOF) printf(%d\n,(a+b)); } 1001 #includestdio.h int main() { long n,m; while(scanf(%d,n)!=EOF) { if(n%2!=0) m=(n+1)/2*n; else m=n/2*(n+1); printf(%ld\n\n,m); } return 0; } 1002 #includestdio.h #includestring.h int main() { int a[1002]={0},b[1002]={0},c[1002]={0}; int i,n,k,alen,blen,r=0; char str1[1002],str2[1002]; scanf(%d,n); while(n--) //输入要测试的数据次数 { if(r0) printf(\n); //在情况多的时候,输出一个换行符 scanf(%s,str1); alen=strlen(

文档评论(0)

1亿VIP精品文档

相关文档