Untitled

mail@pastecode.io avatar
unknown
plain_text
3 years ago
1.4 kB
2
Indexable
Never
#include<stdio.h>
#include<stdlib.h>
#include<string.h>
#define size 12
int main(int argc,char** argv)
{
    char str1[size];
    char str2[size];
  //  char vowel=['a','e','i','o','y','u'];
    int result=0,count=0,count1=0,c=0,d=0;
    scanf("%s",str1);
    scanf("%s",str2);
    result=strcmp(str1,str2);
    if(result==0)
      printf("Equal\n");
    while (str1[c] != '\0') {
    if (str1[c] == 'a'  || str1[c] == 'e' || str1[c] == 'i'|| str1[c] =='o' || str1[c] == 'u' || str1[c] == 'y')
      {
          count++;
      }
    c++;
    }
    while (str2[d] != '\0') {
    if (str2[d] == 'a'  || str2[d] == 'e' || str2[d] == 'i'|| str2[d] =='o' || str2[d] == 'u' || str2[d] == 'y')
      count1++;
    d++;
    }

    if(count>=count1)
        printf("%d strinng mismatch found",(count-count1));
    else
        printf("%d strinng mismatch found",(count1-count));

    int csount=0,csount1=0,cs=0,ds=0;
    while (str1[cs] != '\0') {
    if (str1[cs] == 'a'  || str1[cs] == 'e' || str1[cs] == 'i'|| str1[cs] =='o' || str1[cs] == 'u' || str1[cs] == 'y')
      csount++;
    cs+=3;
    }
    while (str2[ds] != '\0') {
    if (str2[ds] == 'a'  || str2[ds] == 'e' || str2[ds] == 'i'|| str2[ds] =='o' || str2[ds] == 'u' || str2[ds] == 'y')
      csount1++;
    ds+=3;
    }
    if(csount==csount1)
    {
        printf("Strings are same");
    }

}