Cod sursa(job #1590596)
Utilizator | Data | 5 februarie 2016 12:57:05 | |
---|---|---|---|
Problema | Text | Scor | 70 |
Compilator | cpp | Status | done |
Runda | Arhiva de probleme | Marime | 0.35 kb |
#include <fstream>
#include <string>
using namespace std;
ifstream cin("text.in");
ofstream cout("text.out");
string S; long long N, CUV, RAP;
int main(){
while(cin >> S){
CUV++;
for(int i = 0; i < S.length(); i++){
if((S[i] >= 'A'&& S[i] <= 'Z' ) || (S[i] >= 'a' && S[i] <= 'z')) N++;
}
}
RAP = N/CUV;
cout << RAP;
return 0;
}