Calculate the determinant of a user-entered square

Assignment Help Computer Engineering
Reference no: EM132164407

Using C++ create a program that is composed of five files to calculate the determinant of a user-entered square matrix. The program will have two functions, each with its own header file and source code (.hpp and .cpp) and a main file to run everything.

The matrix will be square and the size will be 2x2 or 3x3. The first function is readMatrix(). It will have two parameters: a pointer to a 2D array and an integer as the size of the matrix.

It will prompt the user to fill a square matrix and store the input into the 2D array. The second function is determinant().

It will have 2 parameters: a 2D array and an integer, which is the size of the square. It will return an integer value with is the determinant of the matrix stored in the 2D array.

In the main file, you will create a program that ask users to choose the size of the matrix (2x2 or 3x3), then uses readMatrix() to prompt the user to enter 4 or 9 values to fill the array, calculate the determinant using determinant(), and display both the array and the determinant to the user.

The array should not be displayed in a single line but in a square format.

Reference no: EM132164407

Questions Cloud

How many times do you expect to win : How many of the 50 states are expected to incorrectly reject H0 for company A?
Design and implement a class for a deck of cards : Design and implement a class for a deck of cards, named DeckOfCards.
Define a function and implement binary search : Define a function and implement binary search to search in the sort the array; in main(), define an integer N.
Food insecurity in the general population : Using a 0.05 significance level, you need to test the claim that the proportion of adults with food insecurity among those with mood disorders
Calculate the determinant of a user-entered square : It will prompt the user to fill a square matrix and store the input into the 2D array. The second function is determinant().
Design a struct or object suitable for representing cats : A particular club whose members are interested in cats wants to computerise all their records.
What would be your prime concerns involving police stress : Define Stress. Distinguish between positive and negative stress, describe a police department program that can be implemented to reduce stress.
Terms of the variables of the particular study : Explain what a Type I and Type II error would be in this study. State the answer in terms of the variables of the particular study.
How may have the given case turned out : Complete a timeline outlining important people, ideas, and events in the forensic science profession which have influenced the criminal justice system.

Reviews

Write a Review

Computer Engineering Questions & Answers

  Security awareness programs for the organization

Security architecture, and which controls you elect to put in place, should be risk-based and driven by business needs, expressed in policy.

  What is the first step in performing risk management

What is the first step in performing risk management? What is the exercise called when you are trying to gauge how significant a risk is? What practice helps address a risk? What ongoing practice helps track risk in real time?

  Into what category of user type would you put edwin

His computer must handle business-related software, and he must have a means of contacting clients and the home office. Into what category of user type would you put Edwin?

  Why the make-buy decision is an important management

The make-buy decision is an important management prerogative. I am supposed to be a manager of a software organization that has the average software development cost of $20.00/LOC.

  Show the number of clock cycles that is needed

Show how you can convert the class B machine (Moor) to class A (Mealy) to improve the number of flip-flops and cut down on the cost.

  What software development methodology would you follow

What Software Development methodology would you follow in developing the computer system for ASC?

  Write a program to read in a collection of integer values

Write a program to read in a collection of integer values, and find and print the index of the first occurrence and last occurrence of the number 12.

  What classes are necessary to obtain a specific degree

What degree is the student working towards? A student can only work on one degree at a time. What classes are necessary to obtain a specific degree?

  Consult the grading rubric to ensure requirements

Consult the grading rubric to ensure requirements are met for this segment of the assignment

  Write a program that plays tic-tac-toe

Write a program that plays tic-tac-toe. The tic-tac-toe game is played on a 3 × 3 grid as in the photo at right.

  Why we cannot apply likelihood weighting to markov networks

Explain intuitively why we cannot simply apply likelihood weighting to Markov networks. Show how likelihood weighting can be applied to chordal Markov networks.

  What structure appear most commonly in a recursive procedure

What control structure appears most commonly in a recursive procedure? What alternative control structure should you consider?

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