Cod sursa(job #2335065)
Utilizator | Data | 3 februarie 2019 16:10:47 | |
---|---|---|---|
Problema | Text | Scor | 100 |
Compilator | cpp-64 | Status | done |
Runda | Arhiva de probleme | Marime | 0.46 kb |
#include <bits/stdc++.h>
#define pb push_back
using namespace std ;
ifstream in ("text.in") ;
ofstream out ("text.out") ;
int newword , nralpha , nrword ;
int main ()
{
char c ;
while ( in.get( c ) )
{
if ( isalpha( c ) )
{
nralpha ++ ;
if ( newword == 0 )
newword = 1 , nrword ++ ;
}
else newword = 0 ;
}
out << nralpha / nrword ;
return 0 ;
}