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
1. A car engine transfers 3000J in 20 seconds. What is the power generated by the engine?
Scorpion4ik [409]

Answer:

  150 W

Explanation:

Power is energy per unit time. The power generated by the engine is ...

  (3000 J)/(20 s) = 150 J/s = 150 W

The engine generated 150 watts.

3 0
3 years ago
Tech A says that to reassemble a duo-servo brake, first reassemble the brake shoes on the backing plate, and then attach the par
cupoosta [38]

A duo-servo break makes use of mechanical arrangements to multiply the braking force

The technician that gives the correct procedure of reassembly of duo-servo  brake is Tech B, therefore;

Tech B only is correct

The process by which the above answer is arrived at  

To reassemble a duo-servo brake, the first step is to reassemble on the brake shoe and parking brake cable, the parking brake lever. The star wheel assembly is then reassembled, and set aside after lubricating the floating end. The pads on the backing plate are lubricated and both brake shoes are then installed on the backing plate

Therefore, Tech A states that the brake shoes on the backing plate are reassembled first is not correct, while Tech B is correct

Learn more about duo-servo brake here:

brainly.com/question/13439898

3 0
3 years ago
If the two 304-stainless-steel carriage bolts of the clamp each have a diameter of 10 mmmm, and they hold the cylinder snug with
S_A_V [24]

Answer: hello some data related to your question is missing attached below is the missing data

answer:

T2 = 265°C

Explanation:

First step : calculate sum of vertical forces

∑ y = 0

Fmg - 2(0.5 Fst ) = 0

∴Fmg = ( 12 * 10^6 ) ( 2 * π/4 (0.01)^2 )

          = 1884.96 N

Also determine the Compatibility equation in order to determine the change in Temperature

ΔT = 250°C

therefore Temperature at which average normal stress becomes 12.0 MPa

ΔT = T2 - T1

250°C = T2 - 15°C

T2 = 250 + 15 = 265°C

attached below is the detailed solution

4 0
3 years ago
Answer every question of this quiz
Reil [10]

I'd say number 4, number 3 looks like an exhaust valve

5 0
4 years ago
In plumbing what is a video snake used for
aleksley [76]

Answer:

How to stop toilets  

Explanation:

I think

Hope this helps

7 0
3 years ago
Read 2 more answers
Other questions:
  • A cruise missile under test is moving horizontally at Ma =2 in the atmosphere at an elevation of 2000 m (Air temperature is 2 °C
    5·1 answer
  • Two parallel surfaces move relative to each other are separated by a gap of 0.375 in. The gap is filled by a fluid of with .0043
    5·1 answer
  • A cold air-standard Diesel cycle has a compression ratio of 18 and a cutoff ratio of 1.5. Determine the maximum temperature of t
    12·1 answer
  • Consider a silicon p-n step junction (or abrupt junction) at room temperature. If the doping concentrations are Na = 10^17 cm^-3
    7·1 answer
  • You are using a Geiger counter to measure the activity of a radioactive substance over the course of several minutes. If the rea
    8·1 answer
  • How are popsicles made with juice?
    5·2 answers
  • A questiom for the big carb himself no cap
    7·1 answer
  • A rectangular block of 1m by 0.6m by 0.4m floats in water with 1/5th of its volume being out of water. Find the weight of the bl
    8·1 answer
  • If I have a scaffold that is 83' tall, and the base of my scaffold is 5' wide least base dimension, then I am allowed to space m
    13·1 answer
  • What precautions should be taken to avoid the overloading of domestic electric circuits.
    13·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!