First all, thanks for the quick answer!
The problem i have is how to store the number of letters every word have. I can make an array to hold int's with the number of letters every word have and then do a for ..i am doing something like this..which is far from good
Code:
int c, i, j, count, word_number = 0, word[SIZE];
while ((c = getchar()) != '1') {
if (c != ' ' && c != '\t' && c != '\n') {
++count;
}
else {
word[word_number] = count;
count = 0;
++word_number;
}
}
for (i = 0; i < word_number; ++i) {
printf("%d: ", i+1);
for (j = 0; j < word[i]; ++j) {
printf("*");
}
printf("\n");
}
PS_ Ignore that 1 in the while condition, is because right now i am in windows..and Crt+Z don't works like in Linux.