Pagini recente » Cod sursa (job #3128636) | Cod sursa (job #1845475) | Cod sursa (job #2462021) | Cod sursa (job #1854333) | Cod sursa (job #686474)
Cod sursa(job #686474)
#include <iostream>
#include <cstring>
#include <fstream>
using namespace std;
int main()
{
freopen("text.in", "r", stdin);
freopen("text.out", "w", stdout);
char *text;
int lit = 0, cuv = 0;
text = new char[256];
cin>>text;
fclose(stdin);
bool ic = 0;
while(*text)
{
if((*text >= 'a' && *text <= 'z') || (*text >= 'A' && *text <= 'Z'))
{
if(!ic)
{
ic = 1;
++cuv;
}
++lit;
}
else
ic = 0;
text++;
}
cout<<lit/cuv<<"\n";
fclose(stdout);
return 0;
}