Pagini recente » Cod sursa (job #2846702) | Cod sursa (job #1114156) | Cod sursa (job #2881647) | Cod sursa (job #653685) | Cod sursa (job #649289)
Cod sursa(job #649289)
#include <cstdlib>
#include <cstdio>
#include <iostream>
#include <fstream>
using namespace std;
int main()
{
char c;
long x=0,cv=0,g=1;
ifstream fin; fin.open("text.in");
ofstream fout; fout.open("text.out");
do{
fin.get(c);
if(!fin.eof())
{
if((((int)c>=97)&&((int)c<=122)) || (((int)c>=65) && ((int)c<=90)))
{ x++;
if(g==1) { cv++; g=0; } }
else g=1;
}
}while(!fin.eof());
fin.close();
fout<< (int) (x/cv);
fout.close();
return 0;
}