count in python
it counts the number of elements in the list or in the string(words)
count in python
it counts the number of elements in the list or in the string(words)
count letter in string
#include<stdio.h>
#include<string.h>
int main() {
char c;
char s[100];
scanf("%c", &c);
scanf("%s", s);
int count = 0;
int len = strlen(s);
for (int i = 0; i < len; i++) {
if (s[i] == c) {
count++;
}
}
printf("%d", count);
return 0;
}
Copyright © 2021 Codeinu
Forgot your account's password or having trouble logging into your Account? Don't worry, we'll help you to get back your account. Enter your email address and we'll send you a recovery link to reset your password. If you are experiencing problems resetting your password contact us