#include<stdio.h> #include<conio.h> void main() { int i,j; int a[3][3]; int b[3][3]; clrscr(); printf("Enter values for a:--\n"); for(i=0;i<3;i++) { for(j=0;j<3;j++) { scanf("%d",&a[i][j]); } } printf("Enter values for b:--\n"); for(i=0;i<3;i++) { for(j=0;j<3;j++) { scanf("%d",&b[i][j]); } } clrscr(); printf("\nvalue of matrix a\n"); for(i=0;i<3;i++) { for(j=0;j<3;j++) { printf("\t%d",a[i][j]); } printf("\n"); } printf("\nValue of matrix b \n"); printf("Enter values for a:--\n"); for(i=0;i<3;i++) { for(j=0;j<3;j++) { printf("\t%d",b[i][j]); } printf("\n"); } getch(); }
WAP to get input 2D MATRIX from user and print them on output screen
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment