Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <iostream>
- using namespace std;
- int Voc(char c)
- {
- return c == 'a' || c == 'e' || c == 'i' || c == 'o' || c == 'u';
- }
- int Cons(char c)
- {
- return c >= 'a' && c <= 'z' && Voc(c)==0;
- }
- void F(char s[])
- {
- int i, c=0;
- for(i = 0; s[i] != 0; i++)
- {
- if(Cons(s[i])==1)
- {
- if(s[i] != 'a' && s[i] != 'e'&& s[i] != 'o' && s[i] != 'u')
- c++;
- }
- }
- if(c == i) cout << "DA";
- else cout << "NU";
- }
- int main()
- {
- char s[1000];
- cin.getline(s, 1000);
- F(s);
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement