• 博客园logo
  • 会员
  • 众包
  • 新闻
  • 博问
  • 闪存
  • 赞助商
  • HarmonyOS
  • Chat2DB
    • 搜索
      所有博客
    • 搜索
      当前博客
  • 写随笔 我的博客 短消息 简洁模式
    用户头像
    我的博客 我的园子 账号设置 会员中心 简洁模式 ... 退出登录
    注册 登录
 






琼溪

 
 

Powered by 博客园
博客园 | 首页 | 新随笔 | 联系 | 订阅 订阅 | 管理

2013年10月6日

例7-14
摘要: #includeint main(void){ int i,k; char str1[80],str2[80]; long number; printf("Enter a string:"); i=0; while((str1[i]=getchar())!='\n') i++; str1[i]='\0'; k=0; for(i=0;str1[i]!='\0';i++) if (str1[i]>='0'&&str1[i]='a'&&str1[i]='A 阅读全文
posted @ 2013-10-06 10:17 琼溪 阅读(136) 评论(0) 推荐(0)
 
例7-11
摘要: #includeint main(void){ int i,n,m; char s[10]; printf("Enter a string:"); i=0; while((s[i]=getchar())!='\n') i++; s[i]='\0'; for(n=0,m=i-1;n=m) printf("It is a plalindrome\n"); else printf("It is not a plalindrome\n"); return 0;} 阅读全文
posted @ 2013-10-06 10:03 琼溪 阅读(106) 评论(0) 推荐(0)
 
例7-12+7-13
摘要: #includeint main(void){ int count,i; char str[80]; printf("Enter a string:"); i=0; while((str[i]=getchar())!='\n') i++; str[i]='\0'; count=0; for(i=0;str[i]!='\0';i++) if(str[i]='0') count++; printf("count=%d\n",count); return 0;}#includeint mai... 阅读全文
posted @ 2013-10-06 09:40 琼溪 阅读(168) 评论(0) 推荐(0)