Count the number of words in a text and output the length and position of the longest word. There can be multiple spaces or other symbols between each word.

Count the number of words in a text and output the length and position of the longest word. There can be multiple spaces or other symbols between each word.

#include<stdio.h>
#include<string.h>
//统计一个文本的单词个数并输出最长单词长度和位置,每个单词之间可有多个空格或其它符号 
int main()
{
   
    
    
	char s[100];
	char word[100][100];
	gets(s);
	int n,r=0,h=0,maxlen=0

Guess you like

Origin blog.csdn.net/qq_38178543/article/details/104660812