当前位置:网站首页>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;
}
边栏推荐
- Dark horse notes -- Set Series Collection
- Importation de studio visuel
- Global and Chinese market of insulin pens 2022-2028: Research Report on technology, participants, trends, market size and share
- 来啦~ 使用 EasyExcel 导出时进行数据转换系列新篇章!
- 生成二维码
- Determine whether there is an element in the string type
- Fabric.js 渐变
- Gee: explore the change of water area in the North Canal basin over the past 30 years [year by year]
- 简单封装 js并应用
- Gee dataset: chirps pentad high resolution global grid rainfall dataset
猜你喜欢
Gee: explore the characteristics of precipitation change in the Yellow River Basin in the past 10 years [pixel by pixel analysis]
视差特效的原理和实现方法
Black Horse Notes - - set Series Collection
创新永不止步——nVisual网络可视化平台针对Excel导入的创新历程
2022-2-15 learning xiangniuke project - Section 8 check login status
Visual Studio導入
Fabric. JS activation input box
Disable access to external entities in XML parsing
Gee series: Unit 3 raster remote sensing image band characteristics and rendering visualization
"Original, excellent and vulgar" in operation and maintenance work
随机推荐
Leetcode 18 problem [sum of four numbers] recursive solution
With an amount of $50billion, amd completed the acquisition of Xilinx
Nodejs (03) -- custom module
黑马笔记---Set系列集合
Gee series: Unit 4 data import and export in Google Earth engine
Online English teaching app open source platform (customized)
Fabric.js 右键菜单
LS1046nfs挂载文件系统
Fabric. JS 3 APIs to set canvas width and height
Financial portal related information
7.1模擬賽總結
460. LFU cache bidirectional linked list
Gee: use of common mask functions in remote sensing image processing [updatemask]
Importation de studio visuel
LeetCode 241. Design priorities for operational expressions (divide and conquer / mnemonic recursion / dynamic programming)
paddle: ValueError:quality setting only supported for ‘jpeg‘ compression
Database batch insert data
Software testing learning - day 4
Fabric.js 激活输入框
7. Eleven state sets of TCP