Wednesday, October 31, 2018

MATRIX: PROGRAM TO TRANSPOSE OF A MATRIX

#include<stdio.h>
 #include<conio.h>
void main()
{
int mat1[2][2],i,j,temp;
printf("Enter the matrix:");
for(i=0;i<2;i++)
{
for(j=0;j<2;j++)
{
scanf("%d",&mat1[i][j]);
}
}
printf("Result of matrix:\n");
for(i=0;i<2;i++)
{
for(j=0;j<2;j++)
{
printf("%d ",mat1[j][i]);
}
printf("\n");
}
    getch();
}

No comments:

Post a Comment

Static Member Function

CODE : #include<iostream> using namespace std; class test  {     int code;       static int count;               //static...