Cod sursa(job #2414509)
Utilizator | Data | 24 aprilie 2019 17:23:59 | |
---|---|---|---|
Problema | Text | Scor | 100 |
Compilator | cpp-64 | Status | done |
Runda | Arhiva de probleme | Marime | 0.52 kb |
#include <fstream>
#include <cctype>
using namespace std;
ifstream in("text.in");
ofstream out("text.out");
char ch;
int nrcuv,nrlit;
bool ok = false;
int main()
{
ios_base::sync_with_stdio(false);
in.tie(0);
while(in.get(ch))
{
if(isalpha(ch))
{
if(!ok)
{
ok = true;
nrcuv++;
}
nrlit++;
}
else
ok = false;
}
out << nrlit/nrcuv;
return 0;
}