Cod sursa(job #1665685)
Utilizator | Data | 27 martie 2016 11:31:02 | |
---|---|---|---|
Problema | Text | Scor | 100 |
Compilator | cpp | Status | done |
Runda | Arhiva de probleme | Marime | 0.38 kb |
#include <bits/stdc++.h>
using namespace std;
ifstream f("text.in");
ofstream g("text.out");
int main()
{
char x;
int k=0,nr_cuv=0,lung=0;
while (f.get(x))
{
if(isalpha(x))
{
if(k==0)
nr_cuv++;
k++;
lung++;
}
else
k=0;
}
g<<lung/nr_cuv;
}