Pagini recente » Cod sursa (job #196679) | Cod sursa (job #2094166) | Cod sursa (job #2961058) | Cod sursa (job #1130484) | Cod sursa (job #493336)
Cod sursa(job #493336)
#include<iostream.h>
#include<fstream.h>
#include<string.h>
ifstream f("text.in");
ofstream g("text.out");
int main()
{
char s[256],d[20]=" ,.?<>:;!",e[2]=" ";
long long i,j=0,k=0;
f.get(s,255);
for(i=0;i<=strlen(s)-1;i++)
if(strchr(e,s[i])) k++;
for(i=0;i<=strlen(s)-1;i++)
if(!strchr(d,s[i]))j++;
g<<j/k;
g.close();
f.close();
}