Cod sursa(job #2824202)
Utilizator | Alexandru Dumitru alexdumitru | Data | 31 decembrie 2021 14:10:26 |
---|---|---|---|
Problema | Text | Scor | 100 |
Compilator | cpp-64 | Status | done |
Runda | Arhiva de probleme | Marime | 0.38 kb |
#include <bits/stdc++.h>
using namespace std;
ifstream fin("text.in");
ofstream fout("text.out");
char c;
int t,cu;
bool b;
int main()
{
while(fin.get(c))
{
if(isalpha(c))
{
t++;
b=1;
}
else {
if(b)
cu++;
b=0;
}
}
fout<<t/cu;
return 0;
}