Pagini recente » Borderou de evaluare (job #2646399) | Cod sursa (job #1661243) | Cod sursa (job #3347110) | Cod sursa (job #1363844) | Cod sursa (job #493722)
Cod sursa(job #493722)
#include<iostream.h>
#include<fstream.h>
#include<string.h>
#include<ctype.h>
ifstream f("text.in");
ofstream g("text.out");
int main()
{
char s[256];
long long i,j=0,k=0;
while(f.get(s,255))
for(i=0;i<=strlen(s)-1;i++)
if(isalnum(s[i])){j++;
if(!isalpha(s[i-1])) k++;}
g<<j/k;
cout<<j<<endl<<k;
g.close();
f.close();
}