Cod sursa(job #2040943)
Utilizator | Puiu Ionut ionut_puiu | Data | 16 octombrie 2017 18:31:52 |
---|---|---|---|
Problema | Text | Scor | 0 |
Compilator | cpp | Status | done |
Runda | Arhiva de probleme | Marime | 0.43 kb |
#include <cstdio>
#include <cstring>
#include <cctype>
using namespace std;
FILE *f,*g;
char *p,s[1000020];
int m,cuv,lit;
int main()
{
f=fopen("text.in","r");
g=fopen("text.out","w");
fgets(s+1,1000010,f);
p=s+1;
s[0]=' ';
while(*p)
{
if(isalpha(*p))lit++;
if(!isalpha(*p)&&isalpha(*(p-1)))
cuv++;
p++;
}
fprintf(g,"%d\n",m);
return 0;
}