Cod sursa(job #633952)

Utilizator kisari.andreiAndrei kisari.andrei Data 15 noiembrie 2011 09:54:00
Problema Text Scor 100
Compilator cpp Status done
Runda Arhiva de probleme Marime 0.3 kb
#include<fstream>
using namespace std;
int n,gasit,l;
char x;
int main()
{
ifstream f("text.in");
ofstream g("text.out");
x=f.get();
while(x!=EOF)
{
if((x>='a'&&x<='z')||(x>='A'&&x<='Z'))
{
gasit=0;
l++;
}
else
gasit++;
if (gasit==1&&l!=0)
n++;
x=f.get();
}
g<<l/n;
return 0;
}