Tutorial for prolog program that count vowels
Answers
Answered by
2
1 cvowel([],0).02 vowel([a],Counter):-Counter is 1.03 vowel([e],Counter):-Counter is 1.04 vowel([i],Counter):-Counter is 1.05 vowel([o],Counter):-Counter is 1.06 vowel([u],Counter):-Counter is 1.07 vowel([_];[],Counter):-Counter is 0.08 cvowel([H|T],Counter1):-cvowel(T,Count),vowel(H,Counter),Count is Count09 10+Counter,Counter1 is Counter1+Count.
Similar questions