This project implements a statistical analysis algorithm for 2D arrays (matrices) in C. It generates random datasets and computes key metrics.
-
Initialization:
- User defines the matrix dimension (
$N$ ). - The matrix is populated with random integers in the range
$[0, 100]$ .
- User defines the matrix dimension (
-
Analysis:
-
Minimum (
$min$ ): Tracks the smallest value found. -
Maximum (
$max$ ): Tracks the largest value found. -
Average (
$ort$ ): Calculates the integer mean:$\frac{\sum X_{ij}}{N \times N}$
-
Minimum (
- Compile the code:
gcc main.c -o matrix_stats
- Run the executable:
./matrix_stats
- Enter the size of the matrix (e.g.,
5for a 5x5 matrix).
n i giriniz: 3
45 12 89
33 0 100
5 67 23
min: 0
max: 100
ort: 41