Pagini recente » Cod sursa (job #95601) | Cod sursa (job #3301671) | Borderou de evaluare (job #3183716) | Borderou de evaluare (job #2681951) | Cod sursa (job #2289693)
#include <bits/stdc++.h>
using namespace std;
char c, l = '0';
int total, nr;
bool check(char x){
return ((x >= 'a' && x <='z') || (x>='A' && x<='Z'));
}
int main(){
ifstream cin ("text.in");
ofstream cout ("text.out");
while (cin >> noskipws >> c){
if (check(c) && !check(l)) nr++;
if (check(c)) total++;
l = c;
}
cout << total/nr;
return 0;
}