| 网站首页 | 业界新闻 | 小组 | 威客 | 人才 | 下载频道 | 博客 | 代码贴 | 在线编程 | 编程论坛
欢迎加入我们,一同切磋技术
用户名:   
 
密 码:  
共有 574 人关注过本帖
标题:运行一个程序出了点错误 求改改
取消只看楼主 加入收藏
艾克
Rank: 1
等 级:新手上路
帖 子:2
专家分:0
注 册:2013-11-21
结帖率:0
收藏
已结贴  问题点数:20 回复次数:1 
运行一个程序出了点错误 求改改
#include<stdio.h>
int main()
{int i,j,upp,low,dig,spa,oth;
char text[3][80];
upp=low=dig=spa=oth=0;
for (i=0;i<3;i++)
{printf("piease input line %d:\n",i+1);
gets(text[i]);
for (j=0;j<80 && text[i][j]!='\0';j++)
{if (text[i][j]>='A' && text[i][j]<='Z')
upp++;
else if (text[i][j]>='a' && text[i][j]<='z')
low++;
else if (text[i][j]>='0' && text[i][j]<='9')
dig++;
 else if (text[i][j]=='')
 spa++;
else
 oth++;
}
}
printf("\nupper case:%d\n",upp);
printf("lower case %d\n",low);
printf("digit   :%d\n",dig);
printf("space   :%d\n",spa);
printf("other   :%d\n",oth);
return 0;
}
搜索更多相关主题的帖子: include 
2013-11-21 15:10
艾克
Rank: 1
等 级:新手上路
帖 子:2
专家分:0
注 册:2013-11-21
收藏
得分:0 
那里错了   说明一下
2013-11-21 15:12
快速回复:运行一个程序出了点错误 求改改
数据加载中...
 
   



关于我们 | 广告合作 | 编程中国 | 清除Cookies | TOP | 手机版

编程中国 版权所有,并保留所有权利。
Powered by Discuz, Processed in 0.016943 second(s), 8 queries.
Copyright©2004-2024, BCCN.NET, All Rights Reserved