In this program, we will accept a string containing vowels only. If it has any consonants do not accept it.
Steps to solve the program
- Take a string as input.
- Check whether the string contains any consonants.
- If yes then, print Not Accepted else print Accepted.
- Use for loop for this purpose.
Output :