given an input string Ayodhya your C program to count the number of vowels and consonants and print the frequency of occurrence of each vowel and consonant delete the vowels in the same input string and display the updated string
Sample input:
Enter the input string: Ayodhya
Sample output:
No of vowels:3
Frequency of occurrence:A-2;o-1
No of consonants:4
Frequency of occurrence:y-2;d-1;h-1
1
Expert's answer
2021-07-12T03:09:45-0400
print("Enter a string")
s = input()
li = list(s.split(" "))
li = [int(i) for i in li]
li.sort(reverse = True)
list_string = map(str, li)
s = ""
for x in list_string:
s = s + x + " "
print(s)
Comments
Leave a comment