Pagini recente » Istoria paginii runda/simulare-oji-23-02-2024-clasaxi/clasament | Monitorul de evaluare | Cod sursa (job #387259) | Istoria paginii runda/preoni_nicu | Cod sursa (job #783372)
Cod sursa(job #783372)
#include<iostream>
#include<fstream>
#include<math.h>
using namespace std;
ifstream f("text.in");
ofstream g("text.out");
long ch=0,t=0;
bool w=false;
char c;
int main()
{
while(f.eof())
{
while(f>>c)
if((c>='a'&&c<='z')||(c>='A'&&c<='Z'))
{
ch++;
w=true;
}
else
{
if(w)
t ++;
w=false;
}
}
if(w) t ++;
g<< ch/t;
return 0;
}