WAP in C To Create A Matrix And Display A Matrix
#include<stdio.h>
#include<conio.h> void main() { int a[2][3],i,j; clrscr(); printf(“\nenter values for the matrix :\n”); for(i=0;i<2;i++) for(j=0;j<3;j++) scanf(“%d”,&a[i][j]); printf(“\nthe values of the matrix are:\n); for(i=0;i<2;i++) { for(j=0;j<3;j++) printf(“%5d”,a[i][j]); printf(“\n”); } getch(); } |