当前位置:网站首页>Exercise 7-6 count capital consonants
Exercise 7-6 count capital consonants
2022-07-03 14:09:00 【ᯤ⁹ᴳ⁺ ·】
exercises 7-6 Count capital consonants (15 branch )
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 d,i,j,k;
i=0;
while((d=getchar())!='\n'){
a[i]=(char)d;
i++;
}
a[i]='\0';
k=0;
for(j=0;j<i;j++){
if(a[j]>='A'&&a[j]<='Z'&&a[j]!='A'&&a[j]!='E'&&a[j]!='I'&&a[j]!='O'&&a[j]!='U'){
k++;
}
}
printf("%d",k);
return 0;
}
边栏推荐
- Depth and breadth first traversal of tree (regardless of binary tree)
- Redis: commandes d'action pour les données de type chaîne
- TS code automatically generates JS
- Common mixins
- How to delete an attribute or method of an object
- JVM family - overview, program counter day1-1
- Why don't I have a rookie medal
- Uniapp tips - scrolling components
- Common plug-ins for vite project development
- Go: send the get request and parse the return JSON (go1.16.4)
猜你喜欢

jvm-运行时数据区
[email protected]纳米颗粒)|纳米金属有机框架搭载雷帕霉素|科研试剂"/>金属有机骨架材料ZIF-8包载姜黄素([email protected]纳米颗粒)|纳米金属有机框架搭载雷帕霉素|科研试剂

消息订阅与发布

Implementation of Muduo asynchronous logging
[email protected]纳米粒子"/>金属有机骨架MIL-88负载阿霉素DOX|叶酸修饰UiO-66-NH2负载阿霉素[email protected]纳米粒子

Rasp implementation of PHP

“又土又穷”的草根高校,凭什么被称为“东北小清华”?

Go language web development series 28: solve cross domain access of CORS with gin contrib / CORS

Go language unit test 4: go language uses gomonkey to test functions or methods
[email protected])"/>金属有机骨架(MOFs)抗肿瘤药载体|PCN-223装载甲硝唑|UiO-66包载盐酸环丙沙星([email protected])
随机推荐
JVM系列——概述,程序计数器day1-1
MySQL data processing value addition, deletion and modification
Nucleic acid modified metal organic framework drug carrier | pcn-223 metal organic framework encapsulated ad adamantane | zif-8 encapsulated adriamycin (DOX)
Qt学习19 Qt 中的标准对话框(上)
Qt学习23 布局管理器(二)
js . Find the first palindrome string in the array
Redis: operation command of string type data
Formation of mil-100 (FE) coated small molecule aspirin [email protected] (FE) | glycyrrhetinic acid modified metal organ
Scroll detection of the navigation bar enables the navigation bar to slide and fix with no content
Uniapp tips - scrolling components
1px problem of mobile terminal
全局事件总线
Redis: redis data structure and key operation commands
Redis:Redis的数据结构、key的操作命令
How to promote the progress of project collaboration | community essay solicitation
Windos creates Cordova prompt because running scripts is prohibited on this system
GoLand 2021.1: rename the go project
Print. JS -- web page file printing
[ACNOI2022]猜数
Qt学习25 布局管理器(四)