Cod sursa(job #1206673)
Utilizator | Data | 10 iulie 2014 20:47:57 | |
---|---|---|---|
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");
int main()
{
char c;
int nrC=0,nrL=0,nou=0;
while(!fin.eof())
{
fin.get(c);
if((c>='a' && c<='z') || (c>='A' && c<='Z'))
{
nrL++;
nou++;
}
else
{
if(nou)
nrC++;
nou=0;
}
}
fout<<nrL/nrC;
}