Cod sursa(job #1521016)
Utilizator | Data | 9 noiembrie 2015 20:18:38 | |
---|---|---|---|
Problema | Text | Scor | 100 |
Compilator | cpp | Status | done |
Runda | Arhiva de probleme | Marime | 0.33 kb |
#include<fstream>
using namespace std;
long a,nr,ok,p;
char c;
int main()
{
freopen("text.in","r",stdin);
ofstream g("text.out");
while(scanf("%c",&c)!=EOF)
{
if(c>=65 && c<=90 || c>=97 && c<=122)
{nr++;
ok=1;}
else if(ok==1)
{a++;
ok=0;}
}
g<<nr/a;
return 0;
}