Cod sursa(job #561342)
| Utilizator | Data | 19 martie 2011 21:22:26 | |
|---|---|---|---|
| Problema | Text | Scor | 0 |
| Compilator | cpp | Status | done |
| Runda | Arhiva de probleme | Marime | 0.38 kb |
#include<iostream.h>
#include<fstream.h>
#include<cctype>
int main()
{int i=1,s=1,n=0,p=0,l=0;
char a[10000];
ifstream f("text.in",ios::in);
ofstream g("text.out",ios::out);
while(f.get(a[i]))
i++;
for(s=1;s<=i;s++)
if(((a[s]>='a')&&(a[s]<='z'))||((a[s]>='A')&&(a[s]<='Z')))
l++;
for(s=1;s<=i;s++)
if(a[s]==' ')
p++;
p=p+1;
s=l/p;
g<<p;
f.close();
g.close();
}
