Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <iostream>
- #include <fstream>
- #include <cstring>
- using namespace std;
- char s[250];
- int s1(char s[])
- {
- int t=0,i;
- char voc[]="aeiou";
- for (i=0;i<strlen(s);i++)
- if (strchr(voc,s[i])==NULL) t++;
- return t;
- }
- void s2(char s[])
- {
- char s1[50];
- int i,j;
- s1[0]=0;j=0;
- char voc[]="aeiou";
- for (i=0;i<strlen(s);i++)
- if (strchr(voc,s[i])==NULL)
- {strncat(s1,s+i,1);
- strncat(s1,s+i,1);
- }else
- {
- strncat(s1,s+i,1);
- strcat(s1,"\n");
- strcpy(s,s1);
- }
- int main()
- {
- ifstream f("date.in");
- ofstream g("date.out");
- f>>s;g<<s1(s)<<endl;
- s2(s);g<<s;g.close();
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement