Advertisement
catalyn

vocale egal cu consoane de verificat

Mar 6th, 2017
87
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.35 KB | None | 0 0
  1. #include <iostream>
  2. #include<cstring>
  3. using namespace std;
  4.  
  5. int main()
  6. {
  7. int n,i,nr=0,c=0;
  8. char s[256],v[256]="aeiou";
  9.  
  10. cin.getline(s,256);
  11. n=strlen(s);
  12. for(i=0;i<n;i++)
  13. if(strchr(v,s[i]))
  14. nr++;
  15. else
  16. c++;
  17. if(nr==c)
  18. cout<<"Da";
  19. else
  20. cout<<"Nu";
  21.  
  22.  
  23. return 0;
  24. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement