Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <iostream>
- #include <fstream>
- #include <cstring>
- using namespace std;
- int vocale(char s[])
- {
- int l=0;
- for(int i=0;i<strlen(s);i++)
- if(strchr("aeiouAEIOU",s[i])!=0)
- l++;
- return l;
- }
- int main()
- {
- ifstream fin("date.in");
- ofstream fout("date.out");
- char s1[201],s2[201];
- int maxx=0,m;
- fin.get(s1,200);
- fin.get();
- strcpy(s2,s1);
- char *p=strtok(s1," ");
- while(p)
- {
- m=vocale(p);
- if(m>maxx)
- maxx=m;
- p=strtok(NULL," ");
- }
- p=strtok(s2," ");
- while(p)
- {
- m=vocale(p);
- if(m==maxx)
- fout<<p<<" ";
- p=strtok(NULL," ");
- }
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement