Accept a string containing vowels only.

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
  1. Take a string as input.
  2. Check whether the string contains any consonants.
  3. If yes then, print Not Accepted else print Accepted.
  4. Use for loop for this purpose.

Output :

avoid spaces in string and get the total length

remove the kth element from the string

Leave a Comment