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