Pagini recente » Cod sursa (job #2858988) | Cod sursa (job #507564) | Diferente pentru problema/cuantictiori intre reviziile 72 si 71 | Cod sursa (job #1976438) | Cod sursa (job #1061330)
#include<stdio.h>
#include<stdlib.h>
using namespace std;
char c; int q,cuv,flag;
int main()
{
FILE*f=fopen("text.in","r"); FILE*h=fopen("text.out","w");
while(!feof(f))
{
fscanf(f,"%c",&c);
if((c>95&&c<123)||(c<91&&66<c))
{
q++;
flag=1;
}
if((c==32||c==45)&&flag==1) cuv++;
}
printf("%i",q);
printf("%i",cuv);
fclose(f); fclose(h);
return 0;
}