Pagini recente » Diferente pentru problema/sr intre reviziile 14 si 11 | Cod sursa (job #1536103) | Cod sursa (job #1573193) | Cod sursa (job #1777556) | Cod sursa (job #2414509)
#include <fstream>
#include <cctype>
using namespace std;
ifstream in("text.in");
ofstream out("text.out");
char ch;
int nrcuv,nrlit;
bool ok = false;
int main()
{
ios_base::sync_with_stdio(false);
in.tie(0);
while(in.get(ch))
{
if(isalpha(ch))
{
if(!ok)
{
ok = true;
nrcuv++;
}
nrlit++;
}
else
ok = false;
}
out << nrlit/nrcuv;
return 0;
}