Cod sursa(job #873605)
| Utilizator | Data | 7 februarie 2013 14:29:14 | |
|---|---|---|---|
| Problema | Text | Scor | 100 |
| Compilator | cpp | Status | done |
| Runda | Arhiva de probleme | Marime | 0.42 kb |
#include <fstream>
using namespace std;
int main()
{
ifstream f("text.in");
ofstream g("text.out");
char a;
int cuv=0,lung=0,k=0;
while(!f.eof())
{
f.get(a);
if(a>='a' && a<='z' || a>='A' && a<='Z')
{
lung++;
k=1;
}
else
if(k)
{
cuv++;
k=0;
}
}
g<<lung/cuv;
}
