#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
) ; }
//https://pt.stackoverflow.com/q/172952/101
I2luY2x1ZGU8c3RkaW8uaD4KI2luY2x1ZGU8c3RyaW5nLmg+CgppbnQgbWFpbigpIHsKICAgIGNoYXIgc3RyWzUwXTsKICAgIHByaW50ZigiIFdlIHdpbGwgY291bnQgdGhlIG51bWJlciBvZiBsZXR0ZXJzXG4iKTsKICAgIHByaW50ZigiLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLVxuIik7CiAgICBwcmludGYoIlRlbGwgbWUgdGhlIHdvcmQ6IFxuIik7CiAgICBzY2FuZigiJXMiLCBzdHIpOwogICAgaW50IGk7CiAgICBmb3IgKGk9IDA7IHN0cltpXSAhPSAnXDAnOyBpKyspIHByaW50ZigiVGhlIGxldHRlciAlZCBpcyAlY1xuIiwgaSwgc3RyW2ldKTsKICAgIHByaW50ZigifFRoZSBudW1iZXIgb2Ygd29yZHMgaXM6ICVkXG4iLCBpKTsKfQoKLy9odHRwczovL3B0LnN0YWNrb3ZlcmZsb3cuY29tL3EvMTcyOTUyLzEwMQ==