Pagini recente » Cod sursa (job #1905476) | Cod sursa (job #2923485) | Cod sursa (job #2181139) | Cod sursa (job #1045500) | Cod sursa (job #1362774)
/*#include <iostream>
#include <fstream>
#include <cstring>
using namespace std;
ifstream f ("text.in");
ofstream g ("text.out");
int main()
{
char v[251], *p;
while(!f.eof())
{
f.getline(v,251);
p=strstr(v,"-");
//strcpy(v+,);
g<<v<<" ";
}
return 0;
}*/
#include <fstream>
using namespace std;
ifstream fin("text.in");
ofstream fout("text.out");
char x;
int nrl, nrc;
bool cuv = false;
int main()
{
while ( !fin.eof() )
{
x = fin.get();
if ( (x >= 'a' && x <= 'z') || ( x >= 'A' && x <= 'Z') )
{
nrl++;
if ( cuv == false )
{
nrc++;
cuv = true;
}
}
else
cuv = false;
}
int m = nrl / nrc;
fout << m;
fin.close();
fout.close();
return 0;
}