answersLogoWhite

0

void main()

{

int arr[4][4];

int i,j,a,b,f;

printf("\nInput numbers to 4*4 matrix");

for(i=0;i<4;i++)

{

for(j=0;j<4;j++)

{

printf("\nKey in the [%d][%d]) value",i+1,j+1);

scanf("%d",&arr[i][j]);

}

}

for(i=0;i<4;i++)

{

for(j=0,f=0;j<4;j++)

{

if(i!=j&&f==0)

continue;

a=arr[i][j];

b=arr[j][i];

arr[i][j]=b;

arr[j][i]=a;

f=1;

}

}

for(i=0;i<4;i++)

{

for(j=0;j<4;j++)

printf("%d ",arr[j][i]);

printf("\n");

}

}

User Avatar

Wiki User

12y ago

What else can I help you with?

Related Questions

Obtain a transformation which will diagonalize the matrix?

consider a matrix Aobtain a transformation which will diagonalize the matrix.Whatare the coordinates of an arbitrary vectora=traspos(x,y,z)with respect to the basis set which diagonalizes A?


How can I obtain a letter of recommendation for a master's program?

To obtain a letter of recommendation for a master's program, you can ask professors, employers, or mentors who know you well and can speak to your qualifications and abilities. Be sure to provide them with information about the program and your achievements to help them write a strong recommendation letter.


What parts of the animal are involve to obtain its food?

ALL parts save for the reproductive functions.


What are the basic functions of cellular respiration?

see link below To obtain energy from food.


How is the program of pso written in in matlab...For eg i want to obtain optimal position for svc for voltage stability..how will b program..also how to create that program from algorithm..?

The program of PSO in Matlab to obtain optimal position for SVC voltage stability will need written in the standard format beginning with the stability grid.


What happens to an organism if it does not obtain energy?

The organism will surely die if it does not obtain energy since it needs energy to carry out everyday functions.


Is it possible to obtain two associate's degrees?

Yes, it is possible to obtain two associate's degrees by completing the required coursework for each program.


What are the functions of corporate manager?

Planning, managing and controlling resource's to obtain goals and survive in a competitive environment


Can you obtain AIRMILES when you shop Bose Canada?

Yes you can obtain air miles when you or shop Bose Canada. They are one of the companies that offers that program to there customers around the world.


What is the word that means to carry out life functions and processes?

The word you are looking for is &quot;metabolize.&quot; It refers to the process by which living organisms obtain and utilize energy from their surroundings to carry out life functions and processes.


Where can I obtain a Human Service Degree?

Most colleges offer the human services degree program. Where you can obtain one depends on where you live or if you would like to take classes online.


Is it possible to obtain multiple PhDs simultaneously?

Yes, it is possible to obtain multiple PhDs simultaneously, but it is extremely rare and challenging due to the time and dedication required for each program.