Pagini recente » Cod sursa (job #231283) | Cod sursa (job #2281047) | Cod sursa (job #1195806) | Cod sursa (job #364620) | Cod sursa (job #1830854)
#include <iostream>
#include <fstream>
#include <cstring>
using namespace std;
ifstream fin ("text3.in");
ofstream fout ("text3.out");
int main(){
char s[100000];
int litere=0,cuvinte=0;
fin.getline(s,100000,'\n');
for (int i=0;i<strlen(s);i++){
if ((65<=int(s[i]) and int(s[i])<=90)or(97<=int(s[i]) and int(s[i])<=122)){
cuvinte++;
for (;((65<=int(s[i]) and int(s[i])<=90)or(97<=int(s[i]) and int(s[i])<=122)and i<strlen(s));i++)
litere++;
}
}
fout <<litere/cuvinte;
return 0;
}