上一页 1 ··· 77 78 79 80 81 82 83 84 85 ··· 99 下一页

2011年4月28日

首字母变大写

摘要: #include<stdio.h>#include<string.h>int main( ){ char ch[120]; while(gets(ch)) { int i,j,len; len=strlen(ch); for(i=0;i<len;i++) if(ch[i-1]==' '&&i!=0&&ch[i]!=' ') ch[i]=ch[i]-32; if(ch[0]!=' ') ch[0]=ch[0]-32; printf("%s\n",ch);}return 阅读全文

posted @ 2011-04-28 20:01 more think, more gains 阅读(153) 评论(0) 推荐(0) 编辑

查找最大元素

摘要: #include<stdio.h>#include<string.h>int main( ){ char ch[120],max; while(gets(ch)) { int i,j,len; len=strlen(ch); max=ch[0]; for(i=1;i<len;i++) if(ch[i]>max) max=ch[i]; for(i=0;i<len;i++) { printf("%c",ch[i]); if(ch[i]==max) printf("(max)");}puts("") 阅读全文

posted @ 2011-04-28 19:34 more think, more gains 阅读(136) 评论(0) 推荐(0) 编辑

合法标志符

摘要: #include<stdio.h>#include<string.h>#include<stdlib.h>int fun(char a[ ]){ int i,t; t=strlen(a); if(a[0]>='0'&&a[0]<='9') return 0; else if(!((a[0]>='A'&&a[0]<='Z')||(a[0]>='a'&&a[0]<='z')||a[0] 阅读全文

posted @ 2011-04-28 19:23 more think, more gains 阅读(955) 评论(0) 推荐(0) 编辑

求平均成绩

摘要: #include<stdio.h>#include<string.h>#include<stdlib.h>int main( ){ int N,M,i,j,k; float A[60][10],sum[60],B[60]; while(scanf("%d%d",&N,&M)!=EOF) { int num=0;k=0; memset(A,0,sizeof(A)); memset(B,0,sizeof(B)); memset(sum,0,sizeof(sum)); for(i=0;i<N;i++) for(j=0;j& 阅读全文

posted @ 2011-04-28 18:32 more think, more gains 阅读(158) 评论(0) 推荐(0) 编辑

海选女主角

摘要: #include<stdio.h>#include<math.h>int A[1000][1000];int main( ){ int N,M,i,j,k,max,p; while(scanf("%d%d",&N,&M)!=EOF) { for(i=1;i<=N;i++) for(j=1;j<=M;j++) scanf("%d",&A[i][j]); max=fabs(A[1][1]); k=1,p=1; for(i=1;i<=N;i++) for(j=1;j<=M;j++) if( 阅读全文

posted @ 2011-04-28 17:41 more think, more gains 阅读(155) 评论(0) 推荐(0) 编辑

上一页 1 ··· 77 78 79 80 81 82 83 84 85 ··· 99 下一页

导航