Create a two dimensional array called matrix

Assignment Help Data Structure & Algorithms
Reference no: EM131135926

Assignment

Create a two dimensional array called Matrix1 of size 3X3.

Populate it with 1 through 9.

Print Matrix1 row by row, it must look like:

1

2

3

4

5

6

7

8

9

Declare another array of same size called Matrix2

Transpose the contents of Matrix1 into Matrix2.

Print Matrix2 which must look like:

1

4

7

2

5

8

3

6

9

Transpose of an array is when the contents of the row and column are reversed.  No extra variables are allowed.  No hardcoding is acceptable.  You must accomplish this with as few lines of code as possible.

Create a two dimensional array called Matrix1 of size 3X3.

Populate it with 1 through 9.

Print Matrix1 row by row, it must look like:

1

2

3

4

5

6

7

8

9

Pass Matrix1 to a function called diagonal, in which you will change only the diagonal values to zero.

Print Matrix1 which now looks like:

0

2

3

4

0

6

7

8

0

No extra variables are allowed.  No hard coding is acceptable.  You must accomplish this with as few lines of code as possible.

Reference no: EM131135926

Questions Cloud

What lessons could you take from the business concepts : What lessons could you take from the business concepts of fixed and variable costs? And do you factor in the value of your time when you price comparison shop? Why or why not?
Difference between charismatic and transformationl leader : From the e-Activity, compare and contrast the difference between a charismatic leader and a transformational leader. Determine whether you are a charismatic or a transformational leader. Provide a rationale for your response.
What federal and state agencies are required to deal : What federal and state agencies are required to deal with an MCI resulting from a terrorist attack - how do you distinguish between federal and state authorities for both operational and management functions? Explain.
Considering purchasing an automatic sprinkler system : RealTurf is considering purchasing an automatic sprinkler system for its sod farm by borrowing the entire $20,000 purchase price. The loan would be repaid with four equal annual payments at an interest rate of 12%/year. It is anticipated that the ..
Create a two dimensional array called matrix : Create a two dimensional array called Matrix1 of size 3X3. Declare another array of same size called Matrix2. Transpose the contents of Matrix1 into Matrix2.
Describe the various steps you would take in conducting : Assume you are consulting and you have been asked to conduct a comprehensive assessment to determine the training and development needed to elevate the performance of 25 employees in a sales support call center.
Do you support or are you against a national healthcare plan : Do you support or are you against a national healthcare plan and why and Is there a particular healthcare plan (IN U.S.A) that you favor over another ?
About her relationship with another man : Explain whether each of the following losses would be covered under Section II in the homeowners policy. If the loss is not covered, explain how coverage can be obtained.
Compare your spreadsheet’s solution to the answer : Modify the spreadsheet in Sidebar 5-1 to handle recovery periods up to 10 years. Test your spreadsheet by entering the data from Example 5-1 and Problems 1 and 2. Compare your spreadsheet’s solution to the answer to these problems.

Reviews

Write a Review

Data Structure & Algorithms Questions & Answers

  Implement an open hash table

In this programming assignment you will implement an open hash table and compare the performance of four hash functions using various prime table sizes.

  Use a search tree to find the solution

Explain how will use a search tree to find the solution.

  How to access virtualised applications through unicore

How to access virtualised applications through UNICORE

  Recursive tree algorithms

Write a recursive function to determine if a binary tree is a binary search tree.

  Determine the mean salary as well as the number of salaries

Determine the mean salary as well as the number of salaries.

  Currency conversion development

Currency Conversion Development

  Cloud computing assignment

WSDL service that receives a request for a stock market quote and returns the quote

  Design a gui and implement tic tac toe game in java

Design a GUI and implement Tic Tac Toe game in java

  Recursive implementation of euclids algorithm

Write a recursive implementation of Euclid's algorithm for finding the greatest common divisor (GCD) of two integers

  Data structures for a single algorithm

Data structures for a single algorithm

  Write the selection sort algorithm

Write the selection sort algorithm

  Design of sample and hold amplifiers for 100 msps by using n

The report is divided into four main parts. The introduction about sample, hold amplifier and design, bootstrap switch design followed by simulation results.

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