Cod sursa(job #1722909)
Utilizator | Data | 29 iunie 2016 12:32:17 | |
---|---|---|---|
Problema | Text | Scor | 100 |
Compilator | cpp | Status | done |
Runda | Arhiva de probleme | Marime | 0.51 kb |
#include <bits/stdc++.h>
using namespace std;
ifstream fin("text.in");
ofstream fout("text.out");
char c;
void Rez()
{
int contor=0,nrc=0,r=0;
while(fin.get(c))
{
if(('a'<=c and c<='z')|| ('A'<=c and c<='Z'))
{
contor++;
r=1;
}
else if(r==1)
{
nrc++;
r=0;
}
}
fout<<contor/nrc<<"\n";
}
int main()
{
Rez();
fin.close();
fout.close();
return 0;
}