Cod sursa(job #2669719)
Utilizator | Data | 7 noiembrie 2020 18:46:26 | |
---|---|---|---|
Problema | Text | Scor | 100 |
Compilator | cpp-64 | Status | done |
Runda | Arhiva de probleme | Marime | 0.37 kb |
#include <bits/stdc++.h>
using namespace std;
int main()
{
ifstream f("text.in");
ofstream g("text.out");
int n=0,l=0;
char s;
bool cuv=0;
while(f.get(s))
{
if((s>='a'&&s<='z')||(s>='A'&&s<='Z'))
l++,cuv=1;
else if(cuv)
n++,cuv=0;
}
if(cuv)
n++;
g<<l/n;
return 0;
}