1 条题解
-
0
C++ :
#include<iostream> #include<cstdio> using namespace std; char s1[201],s2[101]; void copyvowels(char a[],char b[]) { for (int i=0,j=0; a[i]!='\0'; i++) if (a[i]=='a' || a[i]=='A' || a[i]=='e' || a[i]=='E' || a[i]=='i' || a[i]=='I' || a[i]=='o' || a[i]=='O' || a[i]=='u' || a[i]=='U') b[j++]=a[i]; } int main() { gets(s1); copyvowels(s1,s2); cout<<s2<<endl; return 0; }
Pascal :
var st:string; i:longint; begin readln(st); for i:=1 to length(st) do if (st[i]='a') or (st[i]='e') or (st[i]='i') or (st[i]='u') or (st[i]='o') then write(st[i]); end.
- 1
信息
- ID
- 1565
- 时间
- 1000ms
- 内存
- 128MiB
- 难度
- (无)
- 标签
- (无)
- 递交数
- 0
- 已通过
- 0
- 上传者