Pagini recente » Istoria paginii stelele-2009/9-10/runda-1 | Cod sursa (job #1461490) | Statisticile problemei Tari Straine | Cod sursa (job #3259920) | Cod sursa (job #818843)
Cod sursa(job #818843)
#include <string.h>
#include <fstream>
#include <cmath>
using namespace std;
int main()
{
char s[1000];
int i,c=1,d=0;
ifstream f("text.in");
ofstream g("text.out");
f.get(s,100);
for(i=0;i<strlen(s);i++)
if(s[i]==' ')
c++;
else
if(strchr("abcdefghiklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ",s[i])!=NULL)
d++;
g<<floor(d/c);
return 0;
}