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

  Boundary value analysis

Several functions have an almost infinite number of input values. Testing all of these values is not possible in most cases, and does not necessarily tell us more than testing a few prices.

  Array implementation of the queue

Assuming both integer and pointer occupies 4 bytes each, Array implementation of the queue requires Blank 1_______ bytes and the linked list implementation of the stack requires Blank 2_____bytes.

  Calculating an arithmetic mean, median and mode

Calculate an arithmetic mean, median, and mode for up to fifty test scores. The information are contained in a text file. To determine the median, first sort the array.

  Question about java hashtables

Prompt the user for a string, and display the corresponding number. For example, if the user types "five", the program would output "5". This must be done using the hashtable as created in the previous step.

  Conduct time complexity analysis of the algorithm

Conduct time complexity analysis of the algorithm and hand test your algorithm using your allocated 10-element long list of alphabetic characters as an illustrative/working example

  Explain pros and cons of algorithm

You can start by taking 3-4 schemes for example and then show each step of the GA based algorithm numerically. Explain each step (selection, cross-over, mutation) in detail. You can show in any way as long as each step is shown and explained numer..

  Object identifier tree

Assume you worked for a United States based corporation that wanted to develop its own MIB for managing a product line. Where in the object identifier tree would it be registered?

  Write the preorder traversal representation of the tree

Explain your key steps in determining the shortest path, and give the node sequence that corresponds to that shortest path - Write the preorder traversal representation of the tree.

  Implements a method that receives an array parameter

Continue to properly document your source code. Write this program as if you were explaining it to someone new to arrays. Fully document your code in such a way newcomers to Java will understand and be able to implement a Java array.

  What is the minimum number of attendants

A nursing home employs attendants who are needed around the clock. Each attendant is paid the same, regardless of when his or her shift begins. Each shift is 8 consecutive hours.

  Create time algorithm-minimum time required to finish task

Create the O(|V | + | E |) time algorithm which, given times ti and the dependencies, determines minimum time required to complete all the tasks.

  Develop a comprehensive network design document

Develop network design testing procedures through services, tools, and testing scripts. Describe optimal network design for critical business applications to include effective use of bandwidth and satisfying QoS requirements.

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