Cod sursa(job #362729)
Utilizator | Data | 10 noiembrie 2009 20:22:48 | |
---|---|---|---|
Problema | Text | Scor | 0 |
Compilator | cpp | Status | done |
Runda | Arhiva de probleme | Marime | 0.23 kb |
#include<iostream.h>
#include<fstream.h>
#include<string.h>
int main ()
{ char s[250];
int l=0,k=0,i,nr;
gets(s);
for(i=0;i<=strlen(s)-1;i++)
if(s[i]!=' ')l++;
else k++;
k++;
nr=l/k;
cout<<unsigned(nr);
return 0;
}