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
____ [38]
4 years ago
8

Given a matrix, clockwise-rotate elements in it. Please add code to problem3.cpp and the makefile. Use the code in p3 to test yo

ur code. Submit your code and a cpp.sh url, like in your projects and previous assignments. For the cpp.sh url, put your solution into one large program.
Input
1 2 4
5 7 8
3 6 9

Output:
4 1 2
7 5 3
8 9 6
Engineering
1 answer:
rusak2 [61]4 years ago
5 0

Answer:

/* C Program to rotate matrix by 90 degrees */

#include<stdio.h>

int main()

{

int matrix[100][100];

int m,n,i,j;

printf("Enter row and columns of matrix: ");

scanf("%d%d",&m,&n);

 

/* Enter m*n array elements */

printf("Enter matrix elements: \n");

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

{

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

 {

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

 }

}

 

/* matrix after the 90 degrees rotation */

printf("Matrix after 90 degrees roration \n");

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

{

 for(j=m-1;j>=0;j--)

 {

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

 }

 printf("\n");

}

 

return 0;

 

}

You might be interested in
Consider a finite wing with an aspect of ratio of 7; the airfoil section of the wing is a symmetric airfoil with an infinite-win
kow [346]

Answer:

The solution for this question is attached below:

6 0
4 years ago
Serratia marcescens bacteria are used for the production of threonine. The maximum specific oxygen uptake rate of S. marcescens
Sati [7]

Answer:

The rate of cell metabolism is limited by mass transfer since the value of maximum cell concentration obtained (38 g/l) is lower than 50 g l-1, the value planed.

Explanation:

                                                     Data

<u>kLa</u> = 0.17/s

<u>Solubility of oxygen</u> =  8 × 10^-3 kg / m^3

<u>The maximum specific oxygen uptake rate </u>= 4 mmol O2 / g h.

<u>Concentration of oxygen</u> =  0.5 × 10^-3 kg/ m^3

<u>**The maximum cell density</u> = 50 g/l

___________________

The calculated maximum cell concentration:

xmax=  kLa · CAL*/ qo

CAL* is the solubility of oxygen in the broth and qo is the specific oxygen uptake rate

Replacing the data given

xmax= ( 0.17/s ) ·   (8 × 10^-3 kg / m^3)  /  4 mmol O2 / g h

4 mmol O2 / g h  to kg O2/ g s

4 \frac{mmol}{gh} \frac{1 gmol}{1000mmol}\frac{1h}{3600s}\frac{32 g}{gmol} \frac{1Kg}{1000g}

= 3.56 x 10^-3 kg O2/ g s

So then,

xmax= ( 0.17/s ) ·   (8 × 10^-3 kg / m^3)  / 3.56 x 10^-3 o kg O2/ g s

xmax= 3. 8 x 10^4 g/ m^3   = 38 g/l

_____________________

5 0
3 years ago
14. Tires are rotated to
ExtremeBDS [4]

Answer:

A

Explanation:

3 0
3 years ago
Read 2 more answers
Consider two houses that are identical, except that the walls are built using bricks in one house, and wood in the other. The wa
Vesnalui [34]

Answer:

Walls Built Using Bricks and Wood

The brick house is more energy-efficient than the one built with wood.

Explanation:

Because of their high thermal mass, which gives bricks the ability to absorb heat and release it over time, bricks remain more energy-efficient than other building materials, including wood.  In summer, bricks leave your home cool.  In winter, they make it warm.  With these two advantages provided by bricks over other building materials, bricks are the most energy-efficient building material.

5 0
3 years ago
When one vessel is overtaking
elena-s [515]

Answer:

Explanation:

The question is asking when one boat is overtaking another boat, the overtaking boat should steer around the slower boat. The slower boat, the vessel being overtaken, is the stand-on vessel.

5 0
3 years ago
Other questions:
  • Derive the probability that a receptor is occupied by a ligand using a model that treats the L ligands in solution as distinguis
    12·1 answer
  • In a right triangle, the square of the length of one side is equal to the sum of the squares of the lengths of the other two sid
    10·1 answer
  • Based on parameters such as the materials shear modulus, diameter of the wire, mean coil diameter, and number of active coils (a
    11·1 answer
  • F1 or MotoGP which one do u guys prefer.
    9·1 answer
  • The development of various technologies led to many historic events. Use information from the Internet to describe one major his
    5·1 answer
  • A workpiece of 2000 mm length and 300 mm width was machined by a planning operation with the feed set at 0.3 mm/stroke. If the m
    11·1 answer
  • Charles, Clarissa, and Francine all work in Manufacturing. The table shows the breakdown of one day for each employee.
    5·2 answers
  • HIIIIIIIIII htrdcvbnjuytresdxcvbnjhytrdefghjkmnbvcdertyhjmn i'm soo bored
    9·2 answers
  • While discussing PCM monitor tests: Technician A says that some monitors only run after another monitor completes. Technician B
    10·1 answer
  • Five kg of nitrogen gas (N2) in a rigid, insulated container fitted with a paddle wheel is initially at 300 K, 150 kPa. The N2 g
    10·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!