#include <stdio.h>
#include <stdlib.h>
int main()
{
FILE *file;
int word;
int num,num2;
int numcount1=0,numcount2=0;
printf("Please enter a keys: ");
if (scanf("%d %d", &num, &num2)==2 ){
} else {
printf("Error:Must two integers");
}
file=fopen("data.txt","r");
while ((word=fgetc(file))!=EOF){
fprintf(stdout, "%c",word);
if (word == num) numcount1++;
if (word == num2) numcount2++;
}
printf("'%d' is found %d times in the txt file\n",num,numcount1);
printf("'%d' is found %d times in the txt file\n",num2,numcount2);
fclose(file);
return 0;
}
#include <stdio.h>
#include <stdlib.h>
int mai