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

Recursion, write a cprogram to calculate fraction through recursion

write a cprogram to calculate fraction through recursion

Array, Assigning value to individual elements in array

Assigning value to individual elements in array

C++ program, Receive 3 numbers and display them in ascending order from sma...

Receive 3 numbers and display them in ascending order from smallest to largest ed#

Amie, what happens when the following command is used? chmod u=rwx,go=r-x f...

what happens when the following command is used? chmod u=rwx,go=r-x foo

Explain private derivation, Private derivation If no specific derivatio...

Private derivation If no specific derivation is listed, then a private derivation is supposed. If a new class is derived privately from its parent class, then: The priva

201 it, overloadstream insertion opertator to display the data of object on...

overloadstream insertion opertator to display the data of object on the console

Notion of encapsulation, The purpose of this assignment is to familiarize y...

The purpose of this assignment is to familiarize you with the notion of encapsulation as well as some aspects of IP and ICMP. Write your programs in C or C++. They will be grade

Quick Homework, Write three functions in C or C++: one that declares a larg...

Write three functions in C or C++: one that declares a large array statically, one that declares the same large array on the stack, and one that creates the same large array from t

Conversion operator, What is conversion operator? Explain it with example.

What is conversion operator? Explain it with example.

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