| 网站首页 | 业界新闻 | 小组 | 威客 | 人才 | 下载频道 | 博客 | 代码贴 | 在线编程 | 编程论坛
欢迎加入我们,一同切磋技术
用户名:   
 
密 码:  
共有 1090 人关注过本帖
标题:多个函数的调用
取消只看楼主 加入收藏
几米的月亮
Rank: 1
等 级:新手上路
帖 子:13
专家分:0
注 册:2018-4-28
结帖率:33.33%
收藏
已结贴  问题点数:20 回复次数:1 
多个函数的调用
图片附件: 游客没有浏览图片的权限,请 登录注册
图片附件: 游客没有浏览图片的权限,请 登录注册
图片附件: 游客没有浏览图片的权限,请 登录注册

为什么没有结果显示求助求助
搜索更多相关主题的帖子: 多个 函数 调用 结果 显示 
2018-05-08 21:06
几米的月亮
Rank: 1
等 级:新手上路
帖 子:13
专家分:0
注 册:2018-4-28
收藏
得分:0 
sorry
#include<stdio.h>
int main()
{
    int letter(char);
    int dight(char);
    int space(char);
    char str[100];
    gets_s(str,100);
    int m, n, z;
    m = letter(str[100]);
    n = dight(str[100]);
    z = space(str[100]);
printf("letter=%d,dight=%d,space=%d", m, n, z);
return 0;

}
int letter(char)
{
    char str[100];
    gets_s(str,100);
    int i = 0,count = 0;
    while (str[i] != '\0')
    {
        if ((str[i] >= 65 && str[i] <= 90) || (str[i] >= 97 && str[i] <= 122))
        {
            count++;
        }
        i++;
    }
    return count;
}
int dight(char)
{
    char str[100];
    gets_s(str, 100);
    int i = 0, count = 0;
    while (str[i] != '\0')
    {
        if (str[i] >= 48&&str[i]<=57)
        {
            count++;
        }

        i++;
    }
    return count;
}


int space(char)
{
    char str[100];
    gets_s(str, 100);
    int i = 0, count = 0;
    while (str[i] != '\0')
    {
        if (str[i] == 32)
        {
            count++;
        }

        i++;
    }
    return count;
}
2018-05-08 21:44
快速回复:多个函数的调用
数据加载中...
 
   



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

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