Pagini recente » Cod sursa (job #1795669) | Cod sursa (job #71878) | Borderou de evaluare (job #1885280) | Cod sursa (job #1161068) | Cod sursa (job #2427111)
#include <iostream>
#include <fstream>
#include <cstring>
using namespace std;
ifstream fin("text.in");
ofstream fout("text.out");
int main()
{
int cuvinte = 0, litere = 0, contor = 0;
char l;
while(fin.get(l))
{
if(isalpha(l))
{
++litere;
++contor;
}
else
{
if(litere != 0)
{
litere = 0;
++cuvinte;
}
}
}
fout << contor / cuvinte;
return 0;
}