Cod sursa(job #868810)
| Utilizator | Data | 31 ianuarie 2013 17:37:11 | |
|---|---|---|---|
| Problema | Text | Scor | 100 |
| Compilator | cpp | Status | done |
| Runda | Arhiva de probleme | Marime | 0.41 kb |
#include <fstream>
using namespace std;
ifstream fin ("text.in");
ofstream fout ("text.out");
int cuvinte, litere;
char x,y;
int main () {
while (1) {
x = fin.get();
if (x == -1)
break;
if ((x>='a' && x<='z') || (x>='A' && x<='Z'))
litere++;
else
if ((y>='a' && y<='z') || (y>='A' && y<='Z'))
cuvinte++;
y=x;
}
fout<<litere/cuvinte<<"\n";
return 0;
}
