Computer Science, asked by pari25325, 1 day ago

To print the number of occurrences of a given alphabet in a given string.

Answers

Answered by ayushlakra299
2

Answer:

string a ={"1,2,3,4,5"}

system.out.print (string.lenth)

Answered by viji18net
0

answer:

string = input("Please enter your own String : ")  

char = input("Please enter your own Character : ")  

count = 0  

for i in range(len(string)):  

 if(string[i] == char):  

   count = count + 1  

print("The total Number of Times ", char, " has Occurred = " , count)

Similar questions