Cod sursa(job #1594959)
Utilizator | Data | 9 februarie 2016 20:44:39 | |
---|---|---|---|
Problema | Text | Scor | 100 |
Compilator | cpp | Status | done |
Runda | Arhiva de probleme | Marime | 0.33 kb |
#include <fstream>
#include <string>
using namespace std;
ifstream cin("text.in");
ofstream cout("text.out");
char a; int N, CUV; bool u;
int main(){
while(cin.get(a)){
if((a >= 'A'&& a <= 'Z' ) || (a >= 'a' && a <= 'z')){
N++;
u = 1;
}
else if(u){
CUV++;
u = 0;
}
}
cout <<N/CUV;
return 0;
}