Advertisement
Guest User

Untitled

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