1answer.
Ask question
Login Signup
Ask question
All categories
  • English
  • Mathematics
  • Social Studies
  • Business
  • History
  • Health
  • Geography
  • Biology
  • Physics
  • Chemistry
  • Computers and Technology
  • Arts
  • World Languages
  • Spanish
  • French
  • German
  • Advanced Placement (AP)
  • SAT
  • Medicine
  • Law
  • Engineering
Mandarinka [93]
3 years ago
7

// Problem 7: inputMatrix (10 points)// Ask the user for each element of the 3X3 matrix and store the elements in"matrixA[][]"//

Display the matrix in the following form:// matrixA =// 1 2 3// 4 5 6// 7 8 9// The user may input any inetgers for matrix elements, not necessarily same asexample above.void inputMatrix(int matrixA[3][3]){}
Computers and Technology
1 answer:
Firdavs [7]3 years ago
4 0

Answer:

Following are the program for the above question:

Explanation:

#include <stdio.h> //header file

void inputMatrix(int matrixA[3][3]) //inputmatrix function to take the inputs and display the outputs.

{

  int i,j; //declare the symbols.

//loop to take the inputs.

 for(i=0;i<3;i++)

  for(j=0;j<3;j++)

   scanf("%d",&matrixA[i][j]);

//loop to print the output

 for(i=0;i<3;i++)

 {

  for(j=0;j<3;j++)

   printf("%2d",matrixA[i][j]);

  printf("\t");

 }

}

int main() //main function

{

  int matrixA[3][3]; //matrix declaration.

inputMatrix(matrixA); //calling function.

   return 0;

}

Output:

  • The above code take the 9 inputs from the user and display the output as described question format.

Code Explanation:

  • There is one user-defined function that takes the double dimension array as the argument.
  • Then it takes the 9 value for the double dimension array.
  • Then it displays the value to the user in that format which is defined by the question.
You might be interested in
Why would businesses apply cell protection to spreadsheet entries? Provide one specific example.
docker41 [41]

Answer:

To protect a formula

Explanation:

One common example to apply cell protection to spreadsheet entries is to protect a formula used in the sheet to calculate payouts or rankings for example.   A manager might want to share the results of the team to all its team and provides some ranking or other form of calculations in the sheet.  He then needs to protect the formula so it's not altered by the team members or anyone else reviewing the file.

6 0
4 years ago
Convert 30 to hexadecimal ​
Delvig [45]

Answer:

1E

Explanation:

Here is a table to help you. Similar to a multipication table, just follow either the number 3 down to A (aka 10) or 6 x 5 and you will find your answer of

1E = 30

6 0
3 years ago
What activities are the most likely to infect your computer with a virus? Check all that apply
Alex17521 [72]
Opening unfamiler emails and visiting unknown websites
4 0
4 years ago
Read 2 more answers
as the reader, you can figure out the writer's ____ based on his or her word choice and sentence structure a. purpose b. audienc
Misha Larkins [42]

Answer:

my choice purpose

Explanation:

the writer simply writes with a purpose to make his audience understand it's with the purpose that he writes

8 0
3 years ago
In this lab, 172.30.0.0 represents the __________ network and 10.20.1.0 represents the _________ network.
umka21 [38]
172.30.0.0: private network
10.20.1.0: public network
6 0
3 years ago
Other questions:
  • The _____ is the area in Microsoft Excel where you can perform file commands such as Save, Open, and Print
    15·1 answer
  • An element in a web page that connects to a different location in the same page or a different page is a _____.
    8·1 answer
  • Read the following paragraph:
    9·2 answers
  • Which of the following statements is false? People tend to shortcut security procedures because the procedures are inconvenient.
    13·1 answer
  • Which renewable resources are available at any time?​
    15·1 answer
  • Intranets: a. are based on mainframe technology. b. provide the platform on which a firm builds its information systems. c. are
    11·1 answer
  • A technician configures a switch with these commands:SwitchA(config)# interface vlan 1 SwitchA(config-if)# ip address 192.168.1.
    8·1 answer
  • A friend asks you for help writing a computer program to calculate the square yards of carpet needed for a dorm room. The statem
    15·1 answer
  • When you make a DNS query, where does your computer first check to find an IP address to name mapping?
    8·1 answer
  • Write a program that produces the following output: CCCCCCCCC ++ ++ CC ++ ++ CC ++++++++++++++ +++++++++++++++ CC ++++++++++++++
    14·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!