Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- 5. #include<iostream>
- #include<cstring>
- using namespace std;
- char x[300], y[300], s[300];
- int main()
- {
- int i;
- cin>>x>>y;
- for(i=0; i<strlen(x); i++)
- {
- if(strchr("aeiou", x[i])!=0 && strchr("aeiou", y[i])!=0)
- {
- strcat(s, "*");
- }
- else if(strchr("aeiou", x[i])==0 && strchr("aeiou", y[i])==0)
- {
- strcat(s, "#");
- }
- else
- {
- strcat(s, "?");
- }
- }
- cout<<s;
- return 0;
- }
- SAU
- #include<iostream>
- #include<cstring>
- using namespace std;
- char x[201], y[201], aux[201];
- int main()
- {
- int i;
- cin.getline(x, 201);
- cin.getline(y, 201);
- for(i=0; i<strlen(x); i++)
- {
- if(strchr("aeiou", x[i])!=0 && strchr("aeiou", y[i])!=0)
- {
- aux[i]='*';
- }
- else if(strchr("aeiou", x[i])==0 && strchr("aeiou", y[i])==0)
- {
- aux[i]='#';
- }
- else
- {
- aux[i]='?';
- }
- }
- cout<<aux;
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement