Cod sursa(job #1225842)
| Utilizator | Data | 3 septembrie 2014 19:50:22 | |
|---|---|---|---|
| Problema | Text | Scor | 100 |
| Compilator | cpp | Status | done |
| Runda | Arhiva de probleme | Marime | 0.52 kb |
#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;
}
