Cod sursa(job #2628059)
Utilizator | Data | 14 iunie 2020 11:37:19 | |
---|---|---|---|
Problema | Text | Scor | 100 |
Compilator | cpp-64 | Status | done |
Runda | Arhiva de probleme | Marime | 0.43 kb |
#include <bits/stdc++.h>
using namespace std;
ifstream in("text.in");
ofstream out("text.out");
char x;
int nr,cuv,nrc;
int main()
{
cuv=1;
while(in.get(x))
{
if(isalpha(x))
{
nr++;
if(cuv==1)
{
nrc++;
cuv=0;
}
}
else
cuv=1;
}
out<<nr/nrc;
return 0;
}