Cod sursa(job #2845834)
Utilizator | Data | 8 februarie 2022 13:57:48 | |
---|---|---|---|
Problema | Text | Scor | 100 |
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;
}