Cod sursa(job #2561223)
Utilizator | Data | 28 februarie 2020 17:52:09 | |
---|---|---|---|
Problema | Text | Scor | 100 |
Compilator | cpp-64 | Status | done |
Runda | Arhiva de probleme | Marime | 0.28 kb |
#include <bits/stdc++.h>
using namespace std;
int main(){
ifstream cin("text.in");
ofstream cout("text.out");
int cuv = 0, lit = 0, y = 0;
char c;
while(cin >> noskipws >> c){
if(isalpha(c)){
if(!y)
y = 1, ++cuv;
++lit;
}
else
y = 0;
}
cout << lit / cuv;
}