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
write a javaprogram to solve padovan string using java? program in java // aakash , suraj , prem sasi kumar kamaraj college program 1 : package test.padovanstring;

Describe spaghetti programming. - Spaghetti programming refers to codes which tend to get tangled and overlapped throughout the program. - It makes a program complex and ana

A: No. (Excluding if you have an old compiler, you might have to force the new operator to throw an exception if it runs out of memory.) This turns out to be a real pain to alwa

is getchar() is a C++ library function?

Selecting Array Elements Implement the following C++ code in assembly language, using the block-structured .IF and .WHILE directives. Assume that all variables are 32-bit signed in

Write a program that writes your name on the monitor ten times. Write this program three times, once with each looping method.

how to create database of faculty database......... send me with program

Write a C program to input 16 numbers and print them out in a table format of 4 wide by 4 deep. E.g.   4    5    5    7   8    9    10    11   12    13    14    15   16    17

c++ coding decode the letters from numbers

Program of function overloading: class vector{                 private :                 int v[3];                   public:                 /*friend istream &