从键盘输入一段话(英文),统计这段话中单词the、of、and、to、a、is出现的频率;将统计后结果输出。使用结构体数组实现!
输入:一些英文句子,不要输入标点符号,单词间用空白符隔开。
输出:依次输出the、of、and、to、a、is的频率,具体输出要求见下面例子。
阅读全部
|
虚怀若谷1201
贴于 2012年12月18日 19:00
hide
bbsi
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#define MAX_TABLE 50
typedef struct {
char name[15];
int score;
int mingci; }Stud;
typedef struct {
Stud *elem;
int length;
}Student;
......................
阅读全部
|
c编程新手
贴于 2012年12月17日 18:15
hide
bbsi
#include<stdio.h>
int main(void)
{
printf("%d\
",15);
return 0;
}
阅读全部
|
wp231957
贴于 2012年12月17日 10:31
hide
bbsi
#include<stdio.h>
#define zero 0.000001
int main(void)
{
double i,j,tmp;
int a,b;
for(i=0.01;i<0.51;i+=0.01)
{
for(j=0.01;j<0.51;j+=0.01)
{
for(a=1;a<150;a++)
......................
阅读全部
|
wp231957
贴于 2012年12月16日 08:12
hide
bbsi
#include<stdio.h>
#define row 3
#define col 4
int main()
{
int list[row][col]={458,45,555,458,55,6454,45,89,55,68,6969,222};
int* tmp=list[0];
int num=sizeof list/sizeof(int);
int i=0,j=0;
while (1)
{
......................
阅读全部
|
wp231957
贴于 2012年12月14日 22:29
hide
bbsi
#include<stdio.h>
struct Count
{
int c;
int count;
};
int main()
{
int list[2][3]={4,55,6,44,55,55};
......................
阅读全部
|
wp231957
贴于 2012年12月14日 22:11
hide
bbsi
#include<stdio.h>
#define row 2
#define col 3
int main()
{
int list[row][col]={458,45,555,458,55,454};
int rets[row*col]={-1};
int i=0,j=0,m=1;
int *tmp;
int num=sizeof list/sizeof(int);
tmp=list[i];
......................
阅读全部
|
wp231957
贴于 2012年12月14日 22:10
hide
bbsi
#include <afx.h>
#include <stdio.h>
int main(void)
{
int lo, hi;
CString str;
CStdioFile fFibo;
fFibo.Open("FIBO.DAT", CFile::modeWrite |
CFile::modeCreate | CFile::typeText);
......................
阅读全部
|
wp231957
贴于 2012年12月14日 20:37
hide
bbsi
#ifndef CPOPWINDOW_H
#define CPOPWINDOW_H
class CPopWindow : public CDialog
{
DECLARE_DYNAMIC(CPopWindow)
public:
CPopWindow(CWnd* pParent = NULL);
virtual ~CPopWindow();
......................
阅读全部
|
小小程序员1
贴于 2012年12月14日 03:42
hide
bbsi