Wap in c to find determinant of matrix order 3x3 , C/C++ Programming

WAP in C to find determinant of matrix order 3x3

#include

#include

void main()

{

                int i, j,cal;

                int det[3][3];

printf("\n Enter Elements of Matric 3x3\n");

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

                {

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

                                {

                                               

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

                                }

                }

                printf("\n Enter matrix is:\n");

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

                {

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

                                                printf("%d\t",det[i][j]);

                printf("\n");

                }

// Determinants of the matrix

                cal=(det[0][0])*(cal=(det[1][1]*det[2][2])-(det[2][1]*det[1][2]))-det[0][1]*((det[1][0]*det[2][2])-(det[2][0]*det[1][2]))+det[0][2]*((det[1][0]*det[2][1])-(det[2][0]*det[1][1]));

                printf("\n the Determinant of the matrix=%d\n",cal);

}

OUTPUT

 

 

 

1053_WAP in C to find determinant of matrix order 3x3.jpg

Posted Date: 9/29/2012 2:51:34 AM | Location : United States







Related Discussions:- Wap in c to find determinant of matrix order 3x3 , Assignment Help, Ask Question on Wap in c to find determinant of matrix order 3x3 , Get Answer, Expert's Help, Wap in c to find determinant of matrix order 3x3 Discussions

Write discussion on Wap in c to find determinant of matrix order 3x3
Your posts are moderated
Related Questions
Static Class Members As we already know all the objects of the class have dissimilar data members but invoke the similar member functions. Though, there is an exception to this

Project Description: Online game development Online Live Baccarat Game is needed - client program. - server program(IOCP or ect..). - web program(ASP or PHP or etc..

Program to calculate tax: float tax (float) ; int main() {                 float purchase, tax_amt, total;                 cout                 cin >> purchase

Write a program to find the area under the curve y = f(x) between x = a and x = b, integrate y = f(x) between the limits of a and b. The area under a curve between two points can b

write a program that would accept the radius of the sphere and return its surface area.

(a) Write a procedure called (area-of-rectangle h w) that computes the area of a rectangle of height h and width w. (b) Write a procedure called (area-of-circle r) that computes

Expected output of the program: 1. Consider the following programs. For each, indicate whether the program is correct. If yes, what is the expected output? If not, what is the

Write a Program to illustrate Array? int x[100]; char text[80]; float temp[30]; static int marks[5]; We are able to use symbolic constants instead of expression. The valu

Train Station C++ Program A C++ program that provides a simple text based interface that will allow a user to create, edit, search, or delete a train schedule. The program will m

Structures A structure is a derived data type. It is a combination of logically related data items. Unlike arrays, which are a collection of such as data types, structures can