Pagini recente » Borderou de evaluare (job #2255562) | Borderou de evaluare (job #2226972) | Cod sursa (job #2121905) | Cod sursa (job #1253101) | Cod sursa (job #1661403)
#include <iostream>
#include <fstream>
#include <string>
using namespace std;
int main ()
{
ifstream fin ("text.in");
ofstream fout ("text.out");
string str;
int nrca=0,nrcu=0;
while (!fin.eof()){
fin>>str;
//<<"str:"<<str<<"\n";
int n=str.length();
////<<"str:"<<str<<"\n";
char c;
//<< " n="<<n;
for (int i=0;i<n;++i)
{
c=str[i];
if ((65 <= c && 90>=c) || (97 <= c && 122>=c))
{
nrca++;
}
}
nrcu++;
}
nrca/=nrcu;
fout<<nrca;
}