#include<stdio.h>
#include<string.h>
int main( ) {
char str[ 50 ] ;
printf ( " We will count the number of letters\n " ) ; printf ( "-------------------------------------\n " ) ; printf ( "Tell me the word: \n " ) ; int i;
for ( i= 0 ; str[ i] != '\0 ' ; i++ ) {
printf ( "The letter %d is %c\n " , i
, str
[ i
] ) ; }
printf ( "|The number of words is: %d\n " , i
) ; }
I2luY2x1ZGU8c3RkaW8uaD4KI2luY2x1ZGU8c3RyaW5nLmg+CgppbnQgbWFpbigpIHsKICAgIGNoYXIgc3RyWzUwXTsKICAgIHByaW50ZigiIFdlIHdpbGwgY291bnQgdGhlIG51bWJlciBvZiBsZXR0ZXJzXG4iKTsKICAgIHByaW50ZigiLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLVxuIik7CiAgICBwcmludGYoIlRlbGwgbWUgdGhlIHdvcmQ6IFxuIik7CiAgICBzY2FuZigiJXMiLCBzdHIpOwogICAgaW50IGk7CiAgICBmb3IgKGk9IDA7IHN0cltpXSAhPSAnXDAnOyBpKyspIHsKICAgICAgICBwcmludGYoIlRoZSBsZXR0ZXIgJWQgaXMgJWNcbiIsIGksIHN0cltpXSk7CiAgICB9CiAgICBwcmludGYoInxUaGUgbnVtYmVyIG9mIHdvcmRzIGlzOiAlZFxuIiwgaSk7Cn0=