Advertisement
Guest User

Untitled

a guest
Dec 9th, 2019
90
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.47 KB | None | 0 0
  1. #include <iostream>
  2. #include <string.h>
  3.  
  4. using namespace std;
  5.  
  6. int main(){
  7. char s[150], vocale[] = "aeou";
  8. int ni = 0;
  9. cin.getline(s, 250);
  10. bool ok = true;
  11.  
  12. for(int i = 0; i < strlen(s); i++){
  13.  
  14. if(strchr(vocale, s[i]))
  15. ok = false;
  16.  
  17. if(s[i] == 'i')
  18. ni++;
  19. }
  20.  
  21. if(ni == strlen(s))
  22. ok = false;
  23.  
  24. if(ok == false)
  25. cout << "NU";
  26. else
  27. cout << "DA";
  28. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement