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
This is what I need help with. "Create a program creates an interface allowing the user to select from some other programs I have made one being a money converter and the other ca

Write a ''C'' program to accept any 3 digit integer number from the keyboard and display the word equivalent representation of the given number

C program to demonstrate Pointer to string: void main() {                 int a;                 char str[]="hello how are you?",*ptr_str;                 ptr_str=&

Write a c++ program to find the sum of 0.123 ??103 and 0.456 ??102 and write the result in three significant digits

I need vsti program Project Description: Knowledge of vsti programs, and music is a plus, ex: nexus I will input the sounds I just need the interface built Skills required

Purpose For this assignment you will need to create either a function list or a record series for a CRCRS. Instructions Note: Complete only one of the two assignment op

v\:* {behavior:url(#default#VML);} o\:* {behavior:url(#default#VML);} w\:* {behavior:url(#default#VML);} .shape {behavior:url(#default#VML);} Normal 0


Mathematical Statements and assignments    Within C we can directly load up the variable from within the program using the mathematical expression equates (=) e.g.   a= 'h'

enter height of the shape: 1 3 5 3 1 3 5 7 5 3 5 7 9 7 5 3 5 7 5 3 1 3 5 3 1