Cod sursa(job #98791)
| Utilizator | Data | 10 noiembrie 2007 16:49:52 | |
|---|---|---|---|
| Problema | Text | Scor | 40 |
| Compilator | cpp | Status | done |
| Runda | Arhiva de probleme | Marime | 0.41 kb |
#include<fstream.h>
#include<string.h>
#include<math.h>
#include<ctype.h>
int main (){
int i,cuv=0,l=0,r;
char s[300];
ifstream in ("text.in");
ofstream out ("text.out");
in.get (s,300);
for (i=0;i<strlen(s);i++)
if (isalpha(s[i]))
l++;
for (i=0;i<strlen(s);i++)
if (isalpha(s[i]))
if (isalpha(s[i+1])<=0)
cuv++;
r=floor(l/cuv) ;
out<<r;
return 0;
}
