Cod sursa(job #2425118)
| Utilizator | Data | 24 mai 2019 12:46:21 | |
|---|---|---|---|
| Problema | Text | Scor | 40 |
| Compilator | cpp-64 | Status | done |
| Runda | Arhiva de probleme | Marime | 0.32 kb |
#include <fstream>
#include <string.h>
using namespace std;
ifstream cin("text.in");
ofstream cout("text.out");
int main()
{
char a;
unsigned long long sp=0,cuv=1;
while(cin.get(a))
{
if((a==' '||a=='-')&&sp) ++cuv;
else if(isalpha(a)) ++sp;
}
cout<<sp/cuv;
return 0;
}
