Pagini recente » Cod sursa (job #1450972) | Cod sursa (job #28345) | Cod sursa (job #1228138) | Cod sursa (job #1835179) | Cod sursa (job #823269)
Cod sursa(job #823269)
#include <fstream>
#include <cstring>
using namespace std;
//const char iname[] = "text.in";
//const char oname[] = "text.out";
//ifstream fin(iname);
//ofstream fout(oname);
ifstream fin("text.in");
ofstream fout("text.out");
char s[ 1000000 ] , x;
int lg , i , j , lgt , nr_cuv;
int VeritaSerum ()
{
for ( i = 0; i < lg; ++i )
{
if ( s[ i ] >= 'a' && s[ i ] <= 'z' )
{
while ( s[ i ] >= 'a' && s[ i ] <= 'z' )
{
++lgt;
++i;
}
++nr_cuv;
}
}
int vs = lgt / nr_cuv;
return vs;
}
int main()
{
fin.get ( s , 1000000 );
lg = strlen ( s );
fout << VeritaSerum () << '\n';
return 0;
}