Cod sursa(job #874151)

Utilizator gerd13David Gergely gerd13 Data 7 februarie 2013 22:34:31
Problema Text Scor 0
Compilator cpp Status done
Runda cnlr_camp Marime 0.4 kb
#include<fstream>
#include<string.h>
using namespace std;
int main()

{
ifstream fin("text.in");
ofstream fout("text.out");
int litera=0, cuvant=0, suma=0, medie;
char s[200];
while(fin.get(s, 200))
{
if(('a'<a && a<='z')||('A'<=a && a<='Z'))
litera++;
else
{
if(l)
cuvant++;
suma=suma+litera;
litera=0;
}
}
medie=suma/cuvinte;
fout<<medie;
fin.close();
fout.close();
return 0;
}