answersLogoWhite

0

What is N M J?

Updated: 12/21/2022
User Avatar

Wiki User

15y ago

Best Answer

Not My Job

User Avatar

Wiki User

15y ago
This answer is:
User Avatar

Add your answer:

Earn +20 pts
Q: What is N M J?
Write your answer...
Submit
Still have questions?
magnify glass
imp
Continue Learning about Engineering

C program to check whether a given matrix is orthogonal or not?

#include<iostream> #include<stdio.h> #include<conio.h> using namespace std; int main() { int a[20][20],b[20][20],c[20][20],i,j,k,m,n,f; cout << "Input row and column of A matrix \n\n"; cin >> n >> m; cout << "\n\nInput A - matrix \n\n"; for(i=0;i<n;++i) for(j=0;j<m;++j) cin >> a[i][j]; cout << "\n\nMatrix A : \n\n"; for(i=0;i<n;++i) { for(j=0;j<m;++j) cout << a[i][j] << " "; cout << "\n\n"; } for(i=0;i<m;++i) for(j=0;j<n;++j) b[i][j]=a[j][i]; cout << "\n\nTranspose of matrix A is : \n\n"; for(i=0;i<m;++i) { for(j=0;j<n;++j) cout << b[i][j] << " "; cout << "\n\n"; } for(i=0;i<m;i++) { for(j=0;j<m;j++){ c[i][j]=0; for(k=0;k<=m;k++) c[i][j]+=a[i][k]*b[k][j]; } } for(i=0;i<m;i++) { for(j=0;j<m;j++) { if((int)c[i][i]==1&&(int)c[i][j]==0) f=1; } } cout<<"\n\n Matrix A * transpose of A \n\n"; for(i=0;i<m;i++) { for(j=0;j<m;j++) cout << c[i][j]; cout << "\n\n"; } if(f==1) cout << "\n\nMatrix A is Orthogonal !!!"; else cout << "\n\nMatrix A is NOT Orthogonal !!!"; getch(); return 0; } -ALOK


Program for row wise sort for a square matrix in C?

#include<stdio.h> #include<conio.h> void main() { int a[10][10],i,j,k,m,n; printf("enter the order"); scanf("%d",&m,&n); for(i=0;i<m;i++) { for(j=0;j<n;j++) { scanf("%d",&a[i][j]); } } for(k=0;k<m;k++) { for(i=0;i<=m-1;i++) { for(j=0;j<n-i-1;j++) { if(a[k][j]>a[k][j+1]) temp=a[k][j]; a[k][j]=a[k][j+1]; a[k][j+1]=temp; } } } for(i=0;i<m;i++) { for(j=0;j<n;j++) { printf("sorted matrix=%d",a[i][j]); } } getch(); }


Write a program on Trace of matrix in C?

#include <conio.h> #include <stdio.h> void main() { int a[16][16]; int c=1,i,j,k,m=0,n,x; clrscr(); printf("Enter the number of rows and columns for the square matrix \n"); scanf("%d",&n); x=n; while(n>=1) { for(k=0;k<n;k++) a[m][k+m]=c++; for(k=1;k<n;k++) a[k+m][n-1+m]=c++; for(k=n-2;k>=0;k--) a[n-1+m][k+m]=c++; for(k=n-2;k>0;k--) a[k+m][m]=c++; n=n-2; m=m+1; } for(i=0;i<x;i++) { for(j=0;j<x;j++) { printf("%5d",a[i][j]); } printf("\n"); } getch(); }


Write a c program to merge two array?

#include <stdio.h> #include <conio.h> void main(){ int a[10],b[10],c[10],i,j,m,n,tmp,k; printf("\nEnter the size of the 1st array:"); scanf("%d",&m); printf("\nEnter the size of the 2nd array:"); scanf("%d",&n); printf("\nEnter the 1st array values:"); for(i=0;i<m;i++){ scanf("%d",&a[i]); } printf("\nEnter the 2nd array values:"); for(i=0;i<n;i++){ scanf("%d",&b[i]); } for(i=0;i<m;i++) { for(j=0;j<m-i;j++) { if(a[j]>a[j+1]) { tmp=a[j]; a[j]=a[j+1]; a[j+1]=tmp; } } } printf("\n\n Array in the ascending order is - \n"); for(i=0;i<m;i++) { printf("\t %d",a[i]); } for(i=0;i<n;i++) { for(j=0;j<n-i;j++) { if(b[j]>b[j+1]) { tmp=b[j]; b[j]=b[j+1]; b[j+1]=tmp; } } } printf("\n\n Array in the ascending order is - \n"); for(i=0;i<n;i++) { printf("\t %d",b[i]); } i=j=k=0; while(i<n&&j<m) { if(a[i]<b[j]) c[k++]=a[i++]; else if(a[i]>b[j]) c[k++]=b[j++]; else { c[k++]=b[j++]; i++; j++; } } if(i<n) { int t; for(t=0;t<n;t++) c[k++]=a[i++]; } if(j<m) { int t; for(t=0;t<m;t++) { c[k++]=b[j++]; } } printf("\nFinally sorted join array is:"); for(k=0;k<(m+n);k++) printf("\t\n %d ",c[k]); getch(); }


Write a program to find out transpose of a given matrix by using arrays?

#include<stdio.h> #include<conio.h> void main() { clrscr(); int m[10][10]; int i,j,r,c; for (i=0;i<10;i++) { for (j=0;j<10;j++) { m[i][j]=0; } } printf("\n Enter size of row and colomn:"); scanf("%d %d",&r,&c); printf("\n Enter the two matrices: \n"); for (i=0;i<r;i++) { for (j=0;j<c;j++) { printf("Enter element %d %d of m1: ",(i+1),(j+1)); scanf("%d",&m[i][j]); } } printf("\n The matrix is: \n"); for (i=0;i<r;i++) { for (j=0;j<c;j++) { printf("%d ",m[i][j]); } printf("\n"); } printf("\n The transpose of the matrix is: \n"); for (i=0;i<r;i++) { for (j=0;j<c;j++) { printf("%d ",m[j][i]); } printf("\n"); } getch(); }

Related questions

C program to check whether a given matrix is orthogonal or not?

#include<iostream> #include<stdio.h> #include<conio.h> using namespace std; int main() { int a[20][20],b[20][20],c[20][20],i,j,k,m,n,f; cout << "Input row and column of A matrix \n\n"; cin >> n >> m; cout << "\n\nInput A - matrix \n\n"; for(i=0;i<n;++i) for(j=0;j<m;++j) cin >> a[i][j]; cout << "\n\nMatrix A : \n\n"; for(i=0;i<n;++i) { for(j=0;j<m;++j) cout << a[i][j] << " "; cout << "\n\n"; } for(i=0;i<m;++i) for(j=0;j<n;++j) b[i][j]=a[j][i]; cout << "\n\nTranspose of matrix A is : \n\n"; for(i=0;i<m;++i) { for(j=0;j<n;++j) cout << b[i][j] << " "; cout << "\n\n"; } for(i=0;i<m;i++) { for(j=0;j<m;j++){ c[i][j]=0; for(k=0;k<=m;k++) c[i][j]+=a[i][k]*b[k][j]; } } for(i=0;i<m;i++) { for(j=0;j<m;j++) { if((int)c[i][i]==1&&(int)c[i][j]==0) f=1; } } cout<<"\n\n Matrix A * transpose of A \n\n"; for(i=0;i<m;i++) { for(j=0;j<m;j++) cout << c[i][j]; cout << "\n\n"; } if(f==1) cout << "\n\nMatrix A is Orthogonal !!!"; else cout << "\n\nMatrix A is NOT Orthogonal !!!"; getch(); return 0; } -ALOK


Factor jm plus jn plus km plus kn?

jm + jn + km + kn = j(m + n) + k(m + n) = (m + n)(j + k)


Program to find the Transpose of matrix using function?

#include<stdio.h> void transpose(int a[50][50]); void main() { int a[50][50],b[50][50],m,n,i,j; scanf("%d",&m,&n); for(i=0;i<m;i++) { for(j=0;j<n;j++) { scanf("%d",&a[i][j]); } } for(i=0;i<n;i++) { for(j=0;j<m;j++) { scanf("%d",&b[i][j]); } } transpose(a,b,m,n) void transpose(int a[50][50],int b[50][50],int m,int n) { int i; for(i=0;i<m;i++) { for(j=0;j<n;j++) { b[i][j]=a[i][j]; } } }


Write a program to form an equilateral triangle with asteriks as follow?

#include<stdio.h> #include<conio.h> { int i,j, m,n; for(i=1;i<=n;i++) { for(j=1;j<=i;j++) { printf("*"); } for(m=0;m<=n-1;m--) { printf(" "); } printf("\n"); } getch(); }


Sum of all diagonals of a square matrix by using c?

/* Ramana Reddy -IIIT */ #include main() { int a[10][10],i,j,m,n,sum=0; printf("Size of Matrix M*N:\n "); scanf("%d%d",&m,&n); if(m==n) { printf("\nEnter %d elements: \n",m*n); for(i=0;i


Program for row wise sort for a square matrix in C?

#include<stdio.h> #include<conio.h> void main() { int a[10][10],i,j,k,m,n; printf("enter the order"); scanf("%d",&m,&n); for(i=0;i<m;i++) { for(j=0;j<n;j++) { scanf("%d",&a[i][j]); } } for(k=0;k<m;k++) { for(i=0;i<=m-1;i++) { for(j=0;j<n-i-1;j++) { if(a[k][j]>a[k][j+1]) temp=a[k][j]; a[k][j]=a[k][j+1]; a[k][j+1]=temp; } } } for(i=0;i<m;i++) { for(j=0;j<n;j++) { printf("sorted matrix=%d",a[i][j]); } } getch(); }


Write c program to find product of matrices?

#include#include#define MAXROWS 10#define MAXCOLS 10void main(){int A[MAXROWS][MAXCOLS], B[MAXROWS][MAXCOLS], C[MAXROWS][MAXCOLS];int M, N;/*Function declarations*/void readMatrix(int arr[][MAXCOLS], int M, int N);void printMatrix(int arr[][MAXCOLS], int M, int N);void productMatrix(int A[][MAXCOLS], int B[][MAXCOLS], int C[][MAXCOLS],int M, int N);clrscr();printf("Enter the value of M and N\n");scanf("%d %d",&M, &N);printf ("Enter matrix A\n");readMatrix(A,M,N);printf("Matrix A\n");printMatrix(A,M,N);printf ("Enter matrix B\n");readMatrix(B,M,N);printf("Matrix B\n");printMatrix(B,M,N);productMatrix(A,B,C, M,N);printf ("The product matrix is\n");printMatrix(C,M,N);}/*Input matrix A*/void readMatrix(int arr[][MAXCOLS], int M, int N){int i, j;for(i=0; i< M ; i++){for ( j=0; j < N; j++){scanf("%d",&arr[i][j]);}}}void printMatrix(int arr[][MAXCOLS], int M, int N){int i, j;for(i=0; i< M ; i++){for ( j=0; j < N; j++){printf("%3d",arr[i][j]);}printf("\n");}}/* Multiplication of matrices */void productMatrix(int A[][MAXCOLS], int B[][MAXCOLS], int C[][MAXCOLS],int M, int N){int i, j, k;for(i=0; i< M ; i++){for ( j=0; j < N; j++){C[i][j] = 0 ;for (k=0; k < N; k++){C[i][j] = C[i][j] + A[i][k] * B[k][j];}}}}


What has the author J N M SMITH written?

J. N. M. SMITH has written: 'POPULATION PERSISTENCE IN FRAGMENTED LANDSCAPES'


What has the author N J M Kwakman written?

N. J. M. Kwakman has written: 'Terrorismebestrijding' -- subject(s): Terrorism


What is the next three letters in the pattern j f m a m j j a?

s o n


Write a c program on matrix multiplication using pointer or for loop?

#include&lt;stdio.h&gt; int *a,*b,*c,i,j,k,m,n; void Read(int *,int,int); void mul(int *,int *,int *,int,int); main() { clrscr(); printf("\n enter no.of rows and colomums"); scanf("%d',&amp;m,&amp;n); a=(int *)malloc(sizeof(int)*m*n); printf("\n enter the elements into a matrix"); Read(a,m,n); b=(int *)malloc(sizeof(int)*m*n); printf("\n enter the elments into b matrix"); Read(b,m,n); printf("\n multiplication is"); c=(int *)malloc(sizeof(int)*m*n); getch(); } void Read(int *x,int m,int n) { for(i=0;i&lt;m;i++) { for(j=0;j&lt;n;j++) { scanf("%d",(x+i*n+j)); } } void mul(int *x,*y,*z,int m ,int n) { for(i=0;i&lt;m;i++) { for(j=0;j&lt;n;j++) { c[i][j]=0; for(k=0;k&lt;n;k++) { c[i][j]+=a[i][k]*b[k][j]; printf("%d",c[i][j]); } } } }


How do you write a C program for matrix addition and multiplication?

#include&lt;stdio.h&gt; #include&lt;conio.h&gt; main() { int a[10][10],b[10][10],c[10][10],m,n,i,j,p,q,op; printf("enter the order of matrix a:n"); scanf("%d",&amp;m,&amp;n); printf("enter the %d elements of a\n",m*); for(i=0;i&lt;m;i++) for(j=0;j&lt;n;j++) scanf("%d",&amp;a[i][j]); printf("enter the order of matrix b:n"); scanf("%d",&amp;p,&amp;q); printf("enter the %d elements of b\n",p*q); for(i=0;i&lt;p;i++) for(j=0;j&lt;q;j++) scanf("%d",&amp;b[i][j]); printf("enter the option\n"); scanf("%d",&amp;option); switch(op) { case '+' : if(m==p&amp;&amp;n==q) printf("the resultant matrix c is:\n"); for(i=0;i&lt;m;i++) for(j=0;j&lt;n;j++) c[i][j]=a[i][j]+b[i][j]; printf("%d",c[i][j]); printf("\n"); break; case '/' : if(n==p) { for(i=0;i&lt;m;;i++); {for(j=0;j&lt;q;j++) {printf("%d",c[i][j]); } } c[i][j]=0; for(p=0;p&lt;n;p++) c[i][j]=c[i][j]+a[i][p]*b[p][j]: } printf("resultant matrix is:\n"); for(i=0;i&lt;m;;i++); {for(j=0;j&lt;q;j++) {printf("%d\t",c[i][j]); } } printf("\n"); getch(); }