Cod sursa(job #564603)
| Utilizator | Data | 27 martie 2011 10:55:20 | |
|---|---|---|---|
| Problema | Text | Scor | 0 |
| Compilator | cpp | Status | done |
| Runda | Arhiva de probleme | Marime | 0.38 kb |
#include <iostream>
#include <fstream>
#include <string>
using namespace std;
ifstream fin("date.in");
ofstream fout("date.out");
int main()
{
char a;
int n=0,c=0;
int ok=0;
while(fin>>a && !fin.eof())
if((a>='a' && a<='z') || (a>='A' && a<='Z'))
{
n++;
if(ok==0) c++;
ok=1;
}
else ok=0;
fout<<n/c;
fin.close();
fout.close();
return 0;
}
