当前位置:网站首页>Zzuli:1065 count the number of numeric characters
Zzuli:1065 count the number of numeric characters
2022-07-02 05:29:00 【Don't explode】
Title Description
Enter a line of characters , Take carriage return as the sign of the end of input . Count the number of numeric characters .
Input
Multiple characters , End with carriage return , Carriage return is not a valid character .
Output
Output an integer , Represents the number of numeric characters .
The sample input Copy
[email protected]
Sample output Copy
8
#include <stdio.h>
int main()
{
char ch;
int sum=0;
while(scanf("%c",&ch),ch!='\n')
{
if(ch>='0'&&ch<='9')
sum++;
}
printf("%d",sum);
return 0;
}
边栏推荐
- 【pyinstaller】_get_sysconfigdata_name() missing 1 required positional argument: ‘check_exists‘
- Generate QR code
- Global and Chinese market of travel data recorder (VDR) 2022-2028: Research Report on technology, participants, trends, market size and share
- 数据库批量插入数据
- How to make an RPM file
- Fabric. JS three methods of changing pictures (including changing pictures in the group and caching)
- Paddlepaddle project source code
- Fabric.js 居中元素
- Fabric.js 将本地图像上传到画布背景
- Ubuntu 20.04 installing mysql8
猜你喜欢
Nodejs (03) -- custom module
Record sentry's path of stepping on the pit
操作符详解
Nodejs (02) - built in module
Gee series: Unit 5 remote sensing image preprocessing [GEE grid preprocessing]
Fabric.js 将本地图像上传到画布背景
Dark horse notes -- Set Series Collection
A collection of commonly used plug-ins for idea development tools
Gee series: Unit 1 Introduction to Google Earth engine
Collectors.groupingBy 排序
随机推荐
Youth training camp -- database operation project
A collection of commonly used plug-ins for idea development tools
H5 jump applet
ThreadLocal memory leak
Fabric. JS activation input box
brew install * 失败,解决方法
Fabric. JS upload local image to canvas background
Fabric.js 3个api设置画布宽高
Nodejs (03) -- custom module
Using Kube bench and Kube hunter to evaluate the risk of kubernetes cluster
Brew install * failed, solution
Creation and destruction of function stack frames
LS1046nfs挂载文件系统
Gee series: Unit 4 data import and export in Google Earth engine
视差特效的原理和实现方法
Leetcode18题 【四数之和】递归解法
黑马笔记---Map集合体系
Fabric. JS iText superscript and subscript
Disable access to external entities in XML parsing
Fabric.js 更换图片的3种方法(包括更换分组内的图片,以及存在缓存的情况)