#include<iostream.h>
void main()
{
char c;
int line=0,word=0,ch=0;
int isword=0;
while((c=cin.get())!=EOF)
{
if(c=='\n')
line++; //遇换行符行数+1
if(c!=' '&&c!='\t'&&c!='\n'){
//读到非间隔符
if(isword==0) word++;
//在单词的起始处给单词数+1
ch++; //字符数加+1
isword=1;
}
else isword=0; //读到间隔符
}
cout<<"行数:"<<line<<endl;
cout<<"单词数:"<<word<<endl;
cout<<"字符数:"<<ch<<endl;
}