Commit 2262f354 by chazog

Upload New File

parent b84b1d2b
Showing with 31 additions and 0 deletions
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
int check(char word[20], char CheckWord[20]);
int main(){
int i = 0;
int Found = 0;
char* ptr = NULL;
char CheckWord[20];
scanf("%s", CheckWord);
ptr = strtok(wordCounts, "|");
while (ptr != NULL) {
i++
puts(ptr);
ptr = strtok(NULL, " ");
}
while(Found == 0){
i++;
if(strcmp(CheckWord, ptr) == 0){
Found = 1;
printf("%d", i);
return 0;
}
}
return 0;
}
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or sign in to comment