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

Assignment question, : Write a program that prompts the user to enter five...

: Write a program that prompts the user to enter five digit positive numbers. The program then outputs the digits of the number one digit per line. Eg if the user enters 32456, th

C++, padovan string c++ program

padovan string c++ program

#palindrome, replace character into string and return value of string that ...

replace character into string and return value of string that are replaced

Luminous Jewels - The Polishing Game, within 2 mins give me answer pllzzzzz...

within 2 mins give me answer pllzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzz

Control structures in cpp, Control structures The control structures app...

Control structures The control structures appear in both structured programming languages as well as object oriented programming languages.  The three constructs used are: i)

C program to store all ascii char into a file, Program is to store all ASCI...

Program is to store all ASCII char into a file: void main()     {   ofstream  fout("ascii.txt");   int i,n=256;   for(i=1;i     {     fout     }

Assignment, can you tell me what is c#

can you tell me what is c#

C++ class, need to create c++ classes to store all pascal types in compiler...

need to create c++ classes to store all pascal types in compiler design.

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