Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <iostream>
- #include <cstring>
- using namespace std;
- int vocala(char v)
- {
- if(strchr("aeiou",v)!=0)
- {
- return 1;
- }
- else
- {
- return 2;
- }
- }
- char s[105],x[105];
- int main()
- {
- int i;
- cin>>x>>s;
- for(i=0;i<strlen(s);i++)
- {
- if(vocala(s[i])==1 && vocala(x[i])==1)
- {
- cout<<"*";
- }
- if(vocala(s[i])==2 && vocala(x[i])==2)
- {
- cout<<"#";
- }
- if((vocala(s[i])==1 && vocala(x[i])==2) || (vocala(s[i])==2 && vocala(x[i])==1))
- {
- cout<<"?";
- }
- }
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement