求**#高人#**指点C语言问题

来源:百度知道 编辑:UC知道 时间:2024/05/21 19:33:12
Write a program to read in each word of a sentence and calculate the average length of the words in the sentence. You can assume that a sentence ends with a full stop and each word is separated from the next by a space. You can also assume that no word is more than twenty-five characters long. (Hint : Hard-code the sentence in your program, e.g. char *p = "Summer time is almost here". You must count each letter in every word and store this value in an array for example. Each word is separated by a space so you need to check for this space to identify each word.)
我不是不懂英文 是我不知道怎么写

计数器度一个字符加1,直到读到空格,保存这个单词的长度,然后清零继续读,直到读到句号。将所有保存下来的单词长度取平均值

你是看不懂英语还是不会写C
这种问法太懒了 hint写的很清楚啊 哪里有问题?