Cod sursa(job #1715933)
| Utilizator | Data | 11 iunie 2016 17:53:43 | |
|---|---|---|---|
| Problema | Text | Scor | 100 |
| Compilator | cpp | Status | done |
| Runda | Arhiva de probleme | Marime | 0.58 kb |
#include <bits/stdc++.h>
using namespace std;
ifstream fin("text.in");
ofstream fout("text.out");
char c;
int n;
void Rezolvare()
{
int cnt=0,aux=0,nrcuv=0,i;
while(fin.get(c))
{
if(('a'<=c and c<='z')|| ('A'<=c and c<='Z'))
{
cnt++;
aux=1;
}
else if(aux==1)
{
nrcuv++;
aux=0;
}
}
if(nrcuv==0)
fout<<"0"<<"\n";
else fout<<cnt/nrcuv<<"\n";
}
int main()
{
Rezolvare();
fin.close();
fout.close();
return 0;
}
