Cod sursa(job #1378089)
Utilizator | Data | 6 martie 2015 10:30:58 | |
---|---|---|---|
Problema | Text | Scor | 100 |
Compilator | cpp | Status | done |
Runda | Arhiva de probleme | Marime | 0.44 kb |
#include <fstream>
using namespace std;
ifstream fin("text.in");
ofstream fout("text.out");
char c;
int l,cuv,k;
int main()
{
while(!fin.eof())
{
fin.get(c);
if((c>='a' && c<='z') || (c>='A' && c<='Z'))
{
l++;
if(!k)
cuv++;
k=1;
}
else
k=0;
}
fout<<l/cuv;
// fout<<l<<" "<<cuv;
return 0;
}