Enter a description:
Enter a string of letters and numbers and of spaces, and a character.
Output Description:
Output of the input string having a number of characters.
Example 1
Entry
ABCDEF A
Export
1
#include <stdio.h>
#include <string.h>
int main ()
{
char STR [10000];
char CH;
int len = 0;
the gets (STR); // i.e. to enter '\ n' is a string terminator
ch = getchar (); // getchar function also possible
// scanf ( "% c", & ch); // use scanf () function of the input character are also possible,
for (int I = 0; I < strlen (STR); I ++)
{
IF (STR [I] == CH || STR [I] == CH || STR -32 [I] + CH == 32)
len ++;
}
the printf ( "% D \ n- ", len);
return 0;
}