Homework5 -...

Info iconThis preview shows pages 1–2. Sign up to view the full content.

View Full Document Right Arrow Icon
Ford Kirkland THIS WORK I'M SUBMITTING FOR GRADING REPRESENTS MY OWN EFFORT. I DID NOT COPY IN WHOLE OR IN PART THE WORK OF OTHERS, NOR DID I HELP OTHERS CHEAT. #include <iostream> #include <iomanip> using namespace std; int main() { cout << "Please enter a 4x4 matrix one row at a time.\n"; int i=0; int j=0; int matrix [i][j]; for (i=0; i <= 3; i++) { cout << "Row " << (i+1) << ": "; for (j=0; j <= 3; j++) { cin >> matrix[i][j]; }} double det; ((matrix[1][1]*(matrix[2][2]*matrix[3][3]-matrix[2][3]*matrix[3][2]))- (matrix[2][1]*(matrix[1][2]*matrix[3][3]-matrix[1][3]*matrix{3][2]))- (matrix[3][1]*(matrix[1][2]*matrix[2][3]-matrix[1][3]*matrix{2][2])))+ (-2)((matrix[0][1]*(matrix[2][2]*matrix[3][3]-matrix[2][3]*matrix[3][2]))-
Background image of page 1

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
Background image of page 2
This is the end of the preview. Sign up to access the rest of the document.

Unformatted text preview: (matrix[3][1]*(matrix[0][3]*matrix[2][3]-matrix[0][3]*matrix{2][2])))+ (3)((matrix[0][1]*(matrix[1][2]*matrix[3][3]-matrix[1][3]*matrix[3][2]))-(matrix[1][1]*(matrix[0][2]*matrix[3][3]-matrix[0][3]*matrix{3][2]))-(matrix[3][1]*(matrix[0][2]*matrix[1][3]-matrix[0][3]*matrix{1][2])))+ (-4)((matrix[0][1]*(matrix[1][2]*matrix[2][3]-matrix[1][3]*matrix[2][2]))-(matrix[1][1]*(matrix[0][3]*matrix[2][2]-matrix[0][2]*matrix{2][3]))-(matrix[2][1]*(matrix[0][2]*matrix[1][3]-matrix[0][3]*matrix{1][2]))) = det; cout << "The matrix you entered is: \n" << matrix[i][j] << "\n\n"; cout << "The determinant of this matrix is: " << det; system ("pause"); return 0; }...
View Full Document

This note was uploaded on 04/21/2011 for the course EEL 4834 taught by Professor Huband during the Spring '08 term at W. Florida.

Page1 / 2

Homework5 -...

This preview shows document pages 1 - 2. Sign up to view the full document.

View Full Document Right Arrow Icon
Ask a homework question - tutors are online