OpenEdv-开源电子网

 找回密码
 立即注册
正点原子全套STM32/Linux/FPGA开发资料,上千讲STM32视频教程免费下载...
查看: 3441|回复: 1

一名小白 需要请求各位大佬的帮助

[复制链接]

2

主题

3

帖子

0

精华

新手上路

积分
33
金钱
33
注册时间
2019-6-29
在线时间
11 小时
发表于 2019-7-12 23:53:27 | 显示全部楼层 |阅读模式
5金钱
本人是一名小白  那位大佬帮忙写一下下面这段代码的流程图  让我参考一下呗

#include <stdio.h>
main()
{
int c, i, nwhite, nother;
int ndigit[10];
        nwhite = nother = 0;
for (i = 0; i < 10; ++i)
        ndigit = 0;
i=0;
while (((c = getchar()) != ‘\n’) && (i!=10))
        if (c >= '0' && c <= '9')
                ndigit[i++]=c-'0';
        else if (c == ' ' || c == '\n' || c == '\t')
                ++nwhite;
        else
                ++nother;
        printf("digits =");
        for (i = 0; i < 10; ++i)
                printf(" %d", ndigit);
        printf(", white space = %d, other = %d\n", nwhite, nother);
}


正点原子逻辑分析仪DL16劲爆上市
回复

使用道具 举报

558

主题

11万

帖子

34

精华

管理员

Rank: 12Rank: 12Rank: 12

积分
164897
金钱
164897
注册时间
2010-12-1
在线时间
2100 小时
发表于 2019-7-13 02:40:15 | 显示全部楼层
回复

使用道具 举报

您需要登录后才可以回帖 登录 | 立即注册

本版积分规则



关闭

原子哥极力推荐上一条 /2 下一条

正点原子公众号

QQ|手机版|OpenEdv-开源电子网 ( 粤ICP备12000418号-1 )

GMT+8, 2024-6-10 09:05

Powered by OpenEdv-开源电子网

© 2001-2030 OpenEdv-开源电子网

快速回复 返回顶部 返回列表