Pagini recente » Clasament kisstibor80 | Cod sursa (job #1593581) | Cod sursa (job #1951039) | Cod sursa (job #2340741) | Cod sursa (job #1830857)
#include <iostream>
#include <fstream>
#include <cstring>
using namespace std;
ifstream fin ("text.in");
ofstream fout ("text.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;
}