eolymp
bolt
Try our new interface for solving problems
Problems

Count the letters

published at 4/22/24, 2:11:10 pm

s = input().lower() c = input().lower()

count = s.count(c)

print(count)

published at 4/30/24, 2:53:01 pm

include <iostream>

using namespace std; int main() { string s; char c; int a=0;

getline(cin,s); cin>>c; for(int i=0;i<s.length();i++){ if(tolower(s[i]) == tolower(c)){ a++; } } cout<<a;

return 0;

} INANAN INANSIN