Pagini recente » Cod sursa (job #13229) | Cod sursa (job #2511931) | Cod sursa (job #2528621) | Cod sursa (job #1534768) | Cod sursa (job #1225842)
#include <fstream>
#define endl f2<<"\n";
#define pr f2<<
using namespace std;
ifstream f1 ("text.in");
ofstream f2 ("text.out");
int main(){
char c;
int len = 0;
int cuv = 0;
int confirm = 0;
//int n;
while(f1>>noskipws>>c){
//n = c;
if((c >= 65 && c <= 90) || (c >= 97 && c <= 122)){
len++;
confirm = 1;
}
else if(confirm){
cuv++;
confirm = 0;
}
}
pr len/cuv ;
return 0;
}