Cod sursa(job #1259899)
Utilizator | Data | 10 noiembrie 2014 18:08:48 | |
---|---|---|---|
Problema | Text | Scor | 100 |
Compilator | cpp | Status | done |
Runda | Arhiva de probleme | Marime | 0.53 kb |
#include <fstream>
#include <cstring>
using namespace std;
ifstream fin("text.in");
ofstream fout("text.out");
int ok,nr2,nr1;
char x;
int main(){
while(fin.get(x)){
if (ok==0){
if ((x>='a' && x<='z') || (x>='A'&&x<='Z')){
ok=1;
}
}
if(ok==1){
if ((x>='a' && x<='z') || (x>='A'&&x<='Z')){
nr1++;
}
else {
nr2++;
ok=0;
}
}
}
fout<<nr1/nr2;
return 0;
}