OI-Codes/FZOI/统计单词个数.cpp
2024-06-26 22:14:00 +08:00

18 lines
184 B
C++

#include <iostream>
using namespace std;
int main()
{
char ch;
int cnt = 1;
while(ch != '.')
{
ch = getchar();
if(ch == ' ')
{
cnt ++ ;
}
}
cout << cnt ;
return 0;
}