Advertisement
flaviucristi01

VARIANTA 93

Nov 17th, 2019
104
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 0.64 KB | None | 0 0
  1. #include <iostream>
  2. #include <cstring>
  3.  
  4. using namespace std;
  5.  
  6. int vocala(char v)
  7. {
  8.     if(strchr("aeiou",v)!=0)
  9.     {
  10.         return 1;
  11.     }
  12.     else
  13.     {
  14.         return 2;
  15.     }
  16. }
  17.  
  18. char s[105],x[105];
  19.  
  20. int main()
  21. {
  22.     int i;
  23.     cin>>x>>s;
  24.     for(i=0;i<strlen(s);i++)
  25.     {
  26.         if(vocala(s[i])==1 && vocala(x[i])==1)
  27.         {
  28.             cout<<"*";
  29.         }
  30.         if(vocala(s[i])==2 && vocala(x[i])==2)
  31.         {
  32.             cout<<"#";
  33.         }
  34.         if((vocala(s[i])==1 && vocala(x[i])==2) || (vocala(s[i])==2 && vocala(x[i])==1))
  35.         {
  36.             cout<<"?";
  37.         }
  38.     }
  39.     return 0;
  40. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement