#include <stdio.h> #include <conio.h> int array = 3; int main() { int a[2][2]; int i, j; printf("Plz., enter the values of matrix: "); for (i = 0; i < array; i++) { for (j = 0; j < array; j++) { printf("a[%d][%d] = ", i, j); scanf("%d",&a[i][j]); } } for (i = 0; i < 3; i++) { printf("|\t"); for (j = 0; j < 3; j++) { printf("%d ",a[i][j]); } printf("\t|\n"); } }
Preview:
downloadDownload PNG
downloadDownload JPEG
downloadDownload SVG
Tip: You can change the style, width & colours of the snippet with the inspect tool before clicking Download!
Click to optimize width for Twitter