当前位置:网站首页>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 :
4Code :
#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);
}边栏推荐
- Leetcode (4) - - trouver la médiane de deux tableaux ordonnés positifs
- Raft 协议
- QT learning 17 dialog box and its types
- Exercise 10-2 recursive factorial sum
- Print. JS -- web page file printing
- 7-18 finding the single root of polynomial by dichotomy
- Metal organic framework MOFs loaded with non steroidal anti-inflammatory drugs | zif-8 wrapped Prussian blue loaded quercetin (preparation method)
- QT learning 23 layout manager (II)
- Interface for querying IP home
- Analysis of the characteristics of page owner
猜你喜欢

Message subscription and publishing

Uio-66-cooh loaded bendamostine | hydroxyapatite (HA) coated MIL-53 (FE) nanoparticles | baicalin loaded manganese based metal organic skeleton material

Exercise 8-8 moving letters

必贝特医药冲刺科创板:年营收97万亏损1.37亿 拟募资20亿

Solution to failure or slow downloading of electron when electron uses electron builder to package

Exercise 10-2 recursive factorial sum

全局事件总线

Comprehensive evaluation of good-looking, easy-to-use and powerful handwriting note taking software: notability, goodnotes, marginnote, handwriting, notes writers, collanote, collanote, prodrafts, not

Scroll detection, so that the content in the lower right corner is not displayed at the top of the page, but is displayed as the mouse slides

Exercise 7-6 count capital consonants
随机推荐
C library function - qsort()
allegro,orcad, net alias,port,off-page connector之间的异同点和如何选取
关于回溯问题中的排列问题的思考(LeetCode46题与47题)
Similarities and differences between Allegro, OrCAD, net alias, port, off page connector and how to select them
Raft 协议
Leetcode (4) -- find the median of two positively ordered arrays
Exercise 8-2 calculate the sum and difference of two numbers
Sendmail无法发送邮件及发送过慢解决
JVM garbage collector
QT learning 20 standard dialog box in QT (middle)
Leetcode(4)——尋找兩個正序數組的中比特數
Cross linked cyclodextrin metal organic framework loaded methotrexate slow-release particles | metal organic porous material uio-66 loaded with flavonoid glycosides | Qiyue
28:第三章:开发通行证服务:11:在配置文件中定义属性,然后在代码中去获取;
Current situation, analysis and prediction of information and innovation industry
GRPC的四种数据流以及案例
Common mixins
[Jilin University] information sharing of postgraduate entrance examination and re examination
Page generation QR code
八大排序
Thinking about the arrangement problem in the backtracking problem (leetcode questions 46 and 47)