Pagini recente » Cod sursa (job #2820801) | Cod sursa (job #299441) | Borderou de evaluare (job #1088572) | Cod sursa (job #2098541) | Cod sursa (job #648801)
Cod sursa(job #648801)
#include <cstdio>
#include <iostream>
#include <fstream>
#include <cmath>
using namespace std;
int main()
{
string aux;
int nrCuvinte = 0,totalLungimi = 0;
ifstream in; in.open("text.in");
while (in.good())
{
in >> aux;
nrCuvinte += 1;
totalLungimi += aux.size();
}
ofstream out; out.open("text.out");
out << trunc(totalLungimi/nrCuvinte);
out.close();
return 0;
}