Pagini recente » Cod sursa (job #1987570) | Cod sursa (job #1459466) | Cod sursa (job #774354) | Cod sursa (job #712572) | 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;
}