Cod sursa(job #2140815)
| Utilizator | Data | 23 februarie 2018 21:46:08 | |
|---|---|---|---|
| Problema | Text | Scor | 10 |
| Compilator | cpp | Status | done |
| Runda | Arhiva de probleme | Marime | 0.36 kb |
#include <bits/stdc++.h>
using namespace std;
ifstream input("text.in");
ofstream print("text.out");
char c;
bool ok=false;
int nr,nrnr;
int main(){
while(!input.eof()){
input>>c;
if(isalpha(c)){
if(!ok)nr++,ok=true;
nrnr++;
}
else ok=false;
}
print<<nrnr/nr;
}
