#include <stdio.h>

int main() {
    int ArregloMatriz[3][3];
    int i, j;

    // Inicialización de la matriz con valores específicos
    int contador = 1;
    for(i = 0; i < 3; i++) {
        for(j = 0; j < 3; j++) {
            ArregloMatriz[i][j] = contador++;
        }
    }

    // Imprimir la matriz
    printf("Matriz 3x3:\n");
    for(i = 0; i < 3; i++) {
        for(j = 0; j < 3; j++) {
            printf("%d ", ArregloMatriz[i][j]);
        }
        printf("\n"); // Nueva línea después de cada fila
    }

    return 0;
}

Embed on website

To embed this program on your website, copy the following code and paste it into your website's HTML: