answered
#include<conio.h> #include<stdio.h> void main() { int a[10][10],m,n,I,j; clrscr(); printf("Enter the number of rows in the matrix:"); scanf("%d",&m); printf("Enter the number of columns in the matrix:"); scanf("%d",&n); for(I=0;I<m;I++) for(j=0;j<n;j++) scanf("%d",&a[I][j]); printf("The matrix is as follows"); for(I=0;I<m;I++) { for(j=0;j<n;j++) printf("%d ",a[I][j]); printf("/n"); } getch(); }
answered
Scanf is used to get the input from the users. Format: Scanf("datatype",&dataname); for ex: To get an integer 'a' from the user scanf("%d",&a); the given value by the user is saved in the data 'a'.
answered question
Blurit is an opportunity for you where you can share your thoughts and views with the world. You can rise questions, for which you would receive several answers with different angles of perception. You can also help others by answering their questions. It is just like a give and take. You wont lose anything in … Read more