Cod sursa(job #1834931)
Utilizator | Data | 25 decembrie 2016 21:31:44 | |
---|---|---|---|
Problema | Text | Scor | 100 |
Compilator | cpp | Status | done |
Runda | Arhiva de probleme | Marime | 0.35 kb |
#include <bits/stdc++.h>
using namespace std;
ifstream in("text.in");
ofstream out("text.out");
char c; long long nr, l; bool cv;
bool lol(char c){
return ((c >= 'a' && c <= 'z') || (c >= 'A' && c <= 'Z'));
}
int main(){
while(in.get(c)){
while(lol(c)) l++, in.get(c), cv = 1;
if(cv) nr++, cv = 0;
}
out << l/nr;
return 0;
}