when reading data from the attached file, apart from the four corner which only associated with #s, how to only grap the data inside the 4 #s border, which are numbers 0-9 and some #s in the middle and store them into 2d array? i only want to store the numbers and the #s between the numbers inside. there is a space in between numbers and #s. there are some spaces, new line character at top, bottom, left and right of the square. below are the codes that i implemented but kind of stuck in some way as may need your help to carry on.
Code:
#include <stdio.h>
#include <stdlib.h>
#include <stdbool.h>
#include <math.h>
#define row 12 /* Number of rows on square */
#define col 12 /* Number of columns on square */
int square[row][col];
int i = 0, j = 0, ch;
int main(int argc, char *argv[]) {
while ((ch = getchar()) != EOF) {
if (ch >= 0 || ch <= 9) {
for (i = row; i >= 1; i--) {
for (j = ch; j <= 23; j++) { thanks in advance.