概述
#include <string.h>
#include <stdlib.h>
#include <iostream>
#define N 20
#define MAX 10000
typedef struct
{
char word[N];
int count;
}Word;
int check(char ch)
{
if((ch>='A' && ch<='Z') || (ch>='a' && ch<='z'))
{
return 1;
}
else return 0;
}
void search(Word word[],char str[],int &count)
{
int i=0;
while(i<count)
{
if(strcmp(word[i].word,str)==0)
{
word[i].count++;
break;
}
i++;
}
if(i==count)
{
strcpy(word[i].word,str);
word[i].count=1;
count++;
}
}
void word_count(char ch[])
{
int i=0,j=0,count=0;
char temp_ch[N]="