Online Judge | Problem Set | Authors | Online Contests | User | ||||||
---|---|---|---|---|---|---|---|---|---|---|
Web Board Home Page F.A.Qs Statistical Charts | Current Contest Past Contests Scheduled Contests Award Contest |
Re:为什么还是PE啊?In Reply To:为什么还是PE啊? Posted by:kobe8936 at 2008-11-22 17:13:16 #include "stdafx.h" #include "test.h" #include <iostream> #include <string> using namespace std; int main() { char check[30]; check[0]='A';check[1]='E';check[2]='I';check[3]='O';check[4]='U'; char input[100]; int j=5;bool fst=true,cfst; while (scanf("%s",input)!=EOF) { int len=strlen(input); cfst=true; for (int i=0;i<len;i++) { if (strchr(check,input[i])==0) { if (input[i]!='.'&&input[i]!=','&&input[i]!='?'&&cfst&&fst==false) { printf(" %c",input[i]); check[j++]=input[i]; cfst=false; } else if (input[i]!='.'&&input[i]!=','&&input[i]!='?') { printf("%c",input[i]); check[j++]=input[i]; } else { printf("%c",input[i]); } } } fst=false; } } Followed by:
Post your reply here: |
All Rights Reserved 2003-2013 Ying Fuchen,Xu Pengcheng,Xie Di
Any problem, Please Contact Administrator