Cod sursa(job #2845058)
Utilizator | Data | 7 februarie 2022 13:13:41 | |
---|---|---|---|
Problema | Text | Scor | 90 |
Compilator | cpp-64 | Status | done |
Runda | Arhiva de probleme | Marime | 0.47 kb |
#include <fstream>
#include <iostream>
#include <climits>
#include <string.h>
using namespace std;
ifstream fin("text.in");
ofstream fout("text.out");
int ok,l,cuv;
char c;
int main()
{
while(fin.get(c))
{
if((c >= 'a' && c <= 'z') || (c >= 'A' && c <=' Z'))
{
ok = 1;
l++;
}
else if(ok == 1)
{
cuv++;
ok = 0;
}
}
fout<<l / cuv;
return 0;
}