Cod sursa(job #2758127)
Utilizator | Data | 8 iunie 2021 18:07:56 | |
---|---|---|---|
Problema | Text | Scor | 100 |
Compilator | cpp-64 | Status | done |
Runda | Arhiva de probleme | Marime | 0.39 kb |
#include <bits/stdc++.h>
using namespace std;
ifstream fin("text.in");
ofstream fout("text.out");
long long nr,cuv;
char last, ch;
int main()
{
fin.get(last);
if(isalpha(last))nr++;
while ( fin.get(ch))
{
//fout<<ch;
if(isalpha(ch)==0&&isalpha(last))cuv++;
else if(isalpha(ch))nr++;
last=ch;
}
fout<<nr/cuv;
return 0;
}