hdu 2101
来源:互联网 发布:淘宝网续签农村淘宝 编辑:程序博客网 时间:2024/05/08 12:46
#include<iostream>
#include<cstring>
using namespace std;
void main()
{
char s[1000];
int n,n1,n2,n3,n4,n5,i;
cin>>n;
while(n--)
{
n1=0,n2=0,n3=0,n4=0,n5=0;
cin>>s;
int t=strlen(s);
for(i=0;i<t;i++)
{
if(s[i]=='a')
{
n1++;
}
if(s[i]=='e')
{
n2++;
}
if(s[i]=='i')
{
n3++;
}
if(s[i]=='o')
{
n4++;
}
if(s[i]=='u')
{
n5++;
}
cout<<"a"<<":"<<n1<<endl;
cout<<"e"<<":"<<n2<<endl;
cout<<"i"<<":"<<n3<<endl;
cout<<"o"<<":"<<n4<<endl;
cout<<"u"<<":"<<n5;
}
}
}
#include<cstring>
using namespace std;
void main()
{
char s[1000];
int n,n1,n2,n3,n4,n5,i;
cin>>n;
while(n--)
{
n1=0,n2=0,n3=0,n4=0,n5=0;
cin>>s;
int t=strlen(s);
for(i=0;i<t;i++)
{
if(s[i]=='a')
{
n1++;
}
if(s[i]=='e')
{
n2++;
}
if(s[i]=='i')
{
n3++;
}
if(s[i]=='o')
{
n4++;
}
if(s[i]=='u')
{
n5++;
}
cout<<"a"<<":"<<n1<<endl;
cout<<"e"<<":"<<n2<<endl;
cout<<"i"<<":"<<n3<<endl;
cout<<"o"<<":"<<n4<<endl;
cout<<"u"<<":"<<n5;
}
}
}
- hdu 2101
- hdu 2101
- hdu 2101
- hdu 2101
- HDU 2101 A计划
- HDU 2101 JAVA
- hdu
- hdu
- HDU
- hdu ()
- hdu
- hdu
- HDU
- HDU
- hdu
- hdu
- HDU
- Hdu
- 类Unix系统常用命令df和du详解
- hdu 2096
- Takedown Complaints in the Android Marketplace
- StringBuffer,String类
- 关于xml与html的转换-xslt
- hdu 2101
- 存储方式SharePreferences
- joj1007
- 实用算法实现-第 8 篇后缀树和后缀数组 [4 最长回文子串]
- 开始运行大全
- Linux学习笔记
- 复习继承,抽象类,接口,想到哪写到哪
- hdu字符串
- CSS定位机制之一:普通流