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

Assignment Help:

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


Related Discussions:- Wap in c to find determinant of matrix order 3x3

Operator precedence and associatively, Op e r a t o r P r e c e d ...

Op e r a t o r P r e c e d e n c e a n d A s s o c i a t i v e l y : T h e op e r a t o r p r e c e d e n c e a n d i

Object tracking project, Identify 2 to 3 existing algorithms commonly used ...

Identify 2 to 3 existing algorithms commonly used for object tracking. Algorithms should be in C or written in MATLAB language. Document these algorithms in flowcharts and run thes

When i develop a destructor, When I develop a destructor, do I require to e...

When I develop a destructor, do I require to explicitly call the destructors for my member objects?

When do employ "const" reference arguments in function?, A: 1.      By u...

A: 1.      By using const protects you against programming errors which inadvertently alter data. 2.      By using const allows function to procedure const and non-const actu

Cpp, At a shop of marbles, packs of marbles are prepared. Packets are named...

At a shop of marbles, packs of marbles are prepared. Packets are named A, B, C, D, E …….. All packets are kept in a VERTICAL SHELF in random order. Any numbers of packets with thes

COMPUTER, THEORY OF A COMPUTER PROGRAMMING

THEORY OF A COMPUTER PROGRAMMING

Explain the terms- substitutability and extensibility, Explain the terms- S...

Explain the terms- Substitutability and Extensibility Substitutability - The objects of a properly derived class can be safely and easily substituted for an object of its

Flowcharts, push and pop operation using array draw flowcharts

push and pop operation using array draw flowcharts

Define some features of static storage class in c program, Define some feat...

Define some features of static storage class in c program? The features of a variable defined to contain a static storage class are as follows. Storage - memory Default

Write Your Message!

Captcha
Free Assignment Quote

Assured A++ Grade

Get guaranteed satisfaction & time on delivery in every assignment order you paid with us! We ensure premium quality solution document along with free turntin report!

All rights reserved! Copyrights ©2019-2020 ExpertsMind IT Educational Pvt Ltd