Pagini recente » Cod sursa (job #682438) | Cod sursa (job #2415020) | Diferente pentru problema/numere7 intre reviziile 15 si 16 | Monitorul de evaluare | Cod sursa (job #834850)
Cod sursa(job #834850)
#include <fstream>
#include<iostream>
using namespace std;
ifstream fin("text.in");
ofstream fout("text.out");
int main()
{
int z=0,y=0,m=0;
char x;
while(fin.get(x))
{
if(('a'<=x && x<='z')||('A'<=x && x<='Z'))z+=1;
else
{
if(z!=0)y++;
m=m+z;
z=0;
}
}
fout<<m/y;
fin.close();
fout.close();
return 0;
}