1. Read file, Create struct 5x5 numbers

Dear Friends
I try to make a program that will read from txt file 5x5= 25 numbers and save them in array again 5x5. My numbers are positive integers. I want to ask here instead of save them in a array 5x5 (wich i have done) can i use a struct that will save seperate dozens and seperate units of each number. How i can do that? Any ideas

2. I'm not sure what you mean by "save seperate dozens and seperate units of each number" - can you elaborate?

Struct variables, like scalar-type variables, can be declared as arrays.

Code:
```#define MAX_ROWS  5
#define MAX_COLS  5

// ...

struct point_s
{
int data;
int unit;
};

// ...

struct point_s point[MAX_ROWS][MAX_COLS];  /* 5 x 5 array of struct */```

3. [I mean if my first nymber of txt file will be for example 15 then in the first position of array [1][1] i must save
1 dozen
5 units (15)

So in the struct i need i guess 2 arrays in first array i will save the dozens to each place and in the second i will save units in each place

4. Code:
```#include <stdio.h>
#include <stdlib.h>
#include <math.h>
#define MAX_ROWS 5
#define MAX_COL 5

struct dozens
{
int arraydozens[MAX_ROWS][MAX_COL];

};

struct units
{
int arrayunits[MAX_ROWS][MAX_COL];
} units[MAX_ROWS][MAX_COL];

int main()
{

//int array[5][5];
int i,j;
struct dozens dozens1 [MAX_ROWS][MAX_COL];

FILE
*myfile;  //Δημιουργία δείκτη file για το άνοιγμα αρχείου
myfile=fopen("c:\\treasure.txt","r");  //’νοιγμα του αρχείου

if (myfile==NULL)
{
printf("File doesnt exist");
exit(0);
}
else
for(i=0;i<5;i++)

for(j=0;j<5;j++)

fscanf(myfile,"%d %d", &dozens1[i][j].arraydozens[i][j]);

for(i=0;i<5;i++)

for(j=0;j<5;j++)
printf("array[%d][%d]=%d\n",i,j,dozens1[i][j].arraydozens[i][j]);
fclose(myfile);

return 0;
}```
I try to do someting like the above but its wrong. I need to read a file with 25 numbers. Then make a struct that will have an array with dosen of the numbers and the other with the unit of the numbers