Untitled

mail@pastecode.io avatar
unknown
plain_text
2 years ago
850 B
1
Indexable
Never
#include <stdio.h>
#include <limits.h>
#include <string.h>
#include <ctype.h>

char *gets(char *str);
//char gets(char str);
char N[25];
char gohell[1000];
int A[1000];
char x;
int main(void){
    int n,t=0;

    scanf("%s",N);
    n=strlen(N);

    while(x=getchar()!=EOF){
        if((int)x==(int)N[0] || (int)x==((int)N[0]+32) || (int)x==((int)N[0]-32)){
            for(int i=1;i<n;i++){
                x=getchar();
                if((int)x!=(int)N[i] || (int)x!=((int)N[i]+32) || (int)x!=((int)N[i]-32)){
                    break;
                }
            }
            x=getchar();
            if(x==' ' || x=='\n' || x=='-' || x=='/' || x==':' || x=='(' || x==')' || x=='[' || x==']' || x==',' || x=='.'){
                t++;
            }
        }
    }

    printf("%d\n",t);
    
    return 0;
}