当前位置:网站首页>Statistical capital consonants
Statistical capital consonants
2022-07-03 14:15:00 【Study hard 867】
English consonants are divided by A
、E
、I
、O
、U
Letters other than . This question requires the preparation of procedures , Statistics in the given string Capitalization The number of consonants .
Input format :
The input gives no more than 80 Characters 、 A string that ends with a carriage return .
Output format :
The output gives the number of uppercase consonants in the string in one line .
sample input :
HELLO World!
sample output :
4
Code :
#include <stdio.h>
int main(){
char a[80];
int i,num=0;
for(i=0;(a[i]=getchar())!='\n';i++){
if(a[i]>'A'&&a[i]<'E')num++;
else if(a[i]>'E'&&a[i]<'I')num++;
else if(a[i]>'I'&&a[i]<'O')num++;
else if(a[i]>'O'&&a[i]<'U')num++;
else if(a[i]>'U'&&a[i]<='Z')num++;
}
printf("%d",num);
}
边栏推荐
- 修改数据库中的记录为什么报这个错
- 中国PETG市场预测及战略研究报告(2022版)
- GRPC的四种数据流以及案例
- concat和concat_ws()区别及group_concat()和repeat()函数的使用
- Article content typesetting and code highlighting
- 7-17 crawling worms (break exercise)
- 适用于XP的DDK
- Too many files with unapproved license
- 全文检索引擎Solr系列—–全文检索基本原理
- Redis: operation command of string type data
猜你喜欢
Exercise 6-1 classify and count the number of characters
常见问题之PHP——ldap_add(): Add: Undefined attribute type in
天图投资冲刺港股:资产管理规模249亿 投了小红书与奈雪
Redis: operation command of string type data
QT learning 22 layout manager (I)
Redis: redis data structure and key operation commands
Comprehensive evaluation of good-looking, easy-to-use and powerful handwriting note taking software: notability, goodnotes, marginnote, handwriting, notes writers, collanote, collanote, prodrafts, not
[email"/>
Folic acid modified metal organic framework (zif-8) baicalin loaded metal organic framework composite magnetic material (AU- [email
QT learning 25 layout manager (4)
Metal organic framework (MOFs) antitumor drug carrier | pcn-223 loaded with metronidazole | uio-66 loaded with ciprofloxacin hydrochloride(
随机推荐
Uio-66-cooh loaded bendamostine | hydroxyapatite (HA) coated MIL-53 (FE) nanoparticles | baicalin loaded manganese based metal organic skeleton material
Why don't I have a rookie medal
JS download files through URL links
虽然不一定最优秀,但一定是最努力的!
Common mixins
JS get DPI, PX to cm, cm to PX
Metal organic framework material zif-8 containing curcumin( [email protected] Nanoparticles) | nano metal organic framework carry
Comprehensive evaluation of good-looking, easy-to-use and powerful handwriting note taking software: notability, goodnotes, marginnote, handwriting, notes writers, collanote, collanote, prodrafts, not
愉悦资本新双币基金近40亿元完成首次关账
Article content typesetting and code highlighting
中国锂电池电解液行业市场专项调研报告(2022版)
Solution to failure or slow downloading of electron when electron uses electron builder to package
Vite project commissioning
1px problem of mobile terminal
jvm-对象生命周期
JS matrix zero
6-9 statistics of single digits (15 points)
全文检索引擎Solr系列—–全文检索基本原理
QT learning 20 standard dialog box in QT (middle)
Redis: commandes d'action pour les données de type chaîne