Cod sursa(job #2183063)
Utilizator | Data | 22 martie 2018 19:48:41 | |
---|---|---|---|
Problema | Text | Scor | 0 |
Compilator | cpp | Status | done |
Runda | Arhiva de probleme | Marime | 0.57 kb |
#include <bits/stdc++.h>
using namespace std;
char x;
int lungime,cardinal,w;
int main()
{
ifstream in ("text.in");
ofstream out ("text.out");
while( in.get(x) )
{
if( (x>='A' && x<='Z') || (x>='a' && x<='z') )
{
if( w==0 )
{
w=1;
cardinal++;
lungime++;
}
else
lungime++;
}
else
w=0;
}
cout<<lungime/cardinal;
in.close();
out.close();
return 0;
}