码迷,mamicode.com
首页 >  
搜索关键字:编写一个程序统计输入字符串中: 各个数字、空白字符、以及其他所有字符出现的次数。    ( 4个结果
编写一个程序,统计输入字符串中每一个小写英文字母出现的次数
import java.util.Scanner; /** * @author:(LiberHome) * @date:Created in 2019/3/1 22:18 * @description: * @version:$ */ /*编写一个程序,统计输入字符串中每一个小写英文字母出现的次数*... ...
分类:其他好文   时间:2019-03-01 23:29:20    阅读次数:649
统计字符
写一个程序统计输入字符串中:各个数字、空白字符、以及其他所有字符出现的次数。#include<stdio.h> #include<stdlib.h> #include<ctype.h>//isspace(),isdigit() intmain() { intspace=0; intother=0; intarr[10]={0}; intch=0; inti=0; while((ch..
分类:其他好文   时间:2015-11-24 06:20:30    阅读次数:121
【C语言】编写一个程序统计输入字符串中: 各个数字、空白字符、以及其他所有字符出现的次数。
#include<stdio.h> intmain() { chars[20]; charnum=0; intnum_count=0; intspace_count=0; intother_count=0; while((num=getchar())!=‘\n‘) { if(num>=‘0‘&&num<=‘9‘) { num_count++; } elseif(num==‘‘) { space_count++; } else { other_count..
分类:编程语言   时间:2015-10-27 07:08:05    阅读次数:234
4条  
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!