Cod sursa(job #226462)
Utilizator | Data | 1 decembrie 2008 20:11:49 | |
---|---|---|---|
Problema | Text | Scor | 0 |
Compilator | cpp | Status | done |
Runda | Arhiva de probleme | Marime | 0.35 kb |
#include<stdio.h>
#include <ctype.h>
char *b;
int nr,nrx,k;
int main()
{
freopen("text.in","r",stdin);
scanf("%s",b);
freopen("text.out","w",stdout);
while (b[k]!=NULL)
{
while (b[k++]==' ');
nr++;
while (b[k++]!=' ')
if (isalpha(b[k]))
nrx++;
}
printf("%s - %s",nr,nrx);
fclose(stdin);
fclose(stdout);
return 1;
}