Advertisement
Guest User

Untitled

a guest
Dec 9th, 2019
111
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.59 KB | None | 0 0
  1. #include <iostream>
  2.  
  3. using namespace std;
  4. int Voc(char c)
  5. {
  6. return c == 'a' || c == 'e' || c == 'i' || c == 'o' || c == 'u';
  7. }
  8. int Cons(char c)
  9. {
  10. return c >= 'a' && c <= 'z' && Voc(c)==0;
  11. }
  12. void F(char s[])
  13. {
  14. int i, c=0;
  15. for(i = 0; s[i] != 0; i++)
  16. {
  17. if(Cons(s[i])==1)
  18. {
  19. if(s[i] != 'a' && s[i] != 'e'&& s[i] != 'o' && s[i] != 'u')
  20. c++;
  21. }
  22. }
  23. if(c == i) cout << "DA";
  24. else cout << "NU";
  25. }
  26.  
  27. int main()
  28. {
  29. char s[1000];
  30. cin.getline(s, 1000);
  31. F(s);
  32.  
  33. return 0;
  34. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement