Cod sursa(job #193730)
| Utilizator | Data | 6 iunie 2008 17:55:34 | |
|---|---|---|---|
| Problema | Text | Scor | 0 |
| Compilator | cpp | Status | done |
| Runda | Arhiva de probleme | Marime | 0.37 kb |
#include<fstream.h>
#include<string.h>
#include<iostream.h>
using namespace std;
int main(){
long m;
char x[200];
float cuv=0,lit=0;
ifstream f ("text.in");
ofstream o ("text.out");
while (f>>x)
f.getline(x,200);
for(int i=0;i<strlen(x);i++)
{if(x[i]==' ')
cuv++;
if(x[i]>='a' && x[i]<='z')
lit++;}
o<<abs(lit/cuv);
return 0;
}
