Cod sursa(job #1700529)
Utilizator | Data | 10 mai 2016 18:43:40 | |
---|---|---|---|
Problema | Text | Scor | 100 |
Compilator | cpp | Status | done |
Runda | Arhiva de probleme | Marime | 0.45 kb |
#include <fstream>
using namespace std;
ofstream fout ("text.out");
ifstream fin ("text.in" );
int cuv,lungime,stop = 0;
char s;
int main()
{
int stop = 0;
while( fin.get( s ))
{
if( ( 65 <= s && s <= 90 ) || ( 97 <= s && s <= 122 ) )
{
stop = 1;
lungime++;
}
else if( stop )
{
cuv++;
stop--;
}
}
fout<<lungime / cuv;
}