Code:
#include <stdio.h>
#include <stdlib.h>
int main()
{
char textfile[99];
FILE *ftxtpoint;
if ((ftxtpoint = fopen("text.txt", "r")) == NULL)
{
printf("ERROR!");
exit(1);
}
fscanf(ftxtpoint,"%[^\n]", textfile);
printf("%s", textfile);
// This is the part where I should put something to look for three-digital numbers
fclose(ftxtpoint);
return 0;
}
My text file looks like this:
The circled numbers should be the result of the program. Let's say in this situation it should write on the end: This .txt file has 3 three-digital numbers.