Dec 12, 2017, 11:56 AM

News:

IT Acumens Proudly Presents "Gin Gly": Sms Backup / Contacts Backup / Sms Grouping Website Used by Members 85,000 - SMS Backed up 7,25,000 - Contacts Stored  28,850. For 5 Years !!

Program in C to transpose the 3x3 matrix

Started by thiruvasagamani, Aug 01, 2008, 03:56 PM

Go Down

thiruvasagamani

Aug 01, 2008, 03:56 PM
Program in C to transpose the 3 x 3 matrix

Code: [Select]
`#include<stdio.h>#include<conio.h>main (){ int a[3][3], b[3][3]; readmatrix(a); transpose(a,b); printmatrix(b); getch();}readmatrix(m)int m[][3];{ int i, j; for(i=0;i<3;i++) for (j=0; j<3;j++) scanf("%d", &m[i][j]);}transpose(a,b)int a[][3], b[][3];{ int i, j; for(i=0;i<3;i++) for (j=0; j<3;j++) { b[j][i]=a[i][j]; }}printmatrix(m)int m[][3];{ int i,j; for(i=0;i<3;i++) { for (j=0; j<3;j++) printf("%d  ", m[i][j]); printf("\n"); }}  `
Thiruvasakamani Karnan

Go Up

With Quick-Reply you can write a post when viewing a topic without loading a new page. You can still use bulletin board code and smileys as you would in a normal post.

Warning: this topic has not been posted in for at least 120 days.
Unless you're sure you want to reply, please consider starting a new topic.

Note: this post will not display until it's been approved by a moderator.
Name:
Email:
Verification: