angelavaida27

Var93_SII_Ex5

Nov 17th, 2019
115
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 0.71 KB | None | 0 0
  1. #include <iostream>
  2. #include <cstring>
  3. using namespace std;
  4. char Cuv1[101], Cuv2[101];
  5. int main ()
  6. {
  7.     int n, m, i, j;
  8.     cin>>Cuv1>>Cuv2;
  9.     n=strlen(Cuv1);
  10.     m=strlen(Cuv2);
  11.     i=0;
  12.     j=0;
  13.     while (i<n && j<m)
  14.     {
  15.         if (strchr("aeiou", Cuv1[i])==0 && strchr("aeiou", Cuv2[j])==0)
  16.         {
  17.             cout<<"#";
  18.         }
  19.         if (strchr("aeiou", Cuv1[i])!=0 && strchr("aeiou", Cuv2[j])!=0)
  20.         {
  21.             cout<<"*";
  22.         }
  23.         if ((strchr("aeiou", Cuv1[i])==0 && strchr("aeiou", Cuv2[j])!=0) ||
  24.             (strchr("aeiou", Cuv1[i])!=0 && strchr("aeiou", Cuv2[j])==0))
  25.         {
  26.             cout<<"?";
  27.         }
  28.         i++;
  29.         j++;
  30.     }
  31.     return 0;
  32. }
Advertisement
Add Comment
Please, Sign In to add comment