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]
3 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]3 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
A study of online dating found that when including emoticons in their profiles, response rates for female users _______ by _____
Dvinal [7]

Answer:

Increased, 5%

Explanation:

Recent studies conducted on online dating sites established that the response of female users increased by 5% when emotions are in their profiles even as for male users' response also increased by 8%. Another study also revealed that those who have never used online dating sites and/or mobile dating apps believe that people who use dating apps are desperate.

8 0
2 years ago
Come and look on my attachment​
CaHeK987 [17]

Crazy Guy what do uh mean ?

4 0
2 years ago
Transmission cleaners are used: A) Only in conjunction with fuel system cleanersB) Only in the colder monthsC) By themselvesD) I
valentina_108 [34]

Answer: D

Explanation: When you change your transmission fluid you change your filter. When you do that you clean where the filter was. Then you can put the new filter on and the new fluid.

5 0
2 years ago
Read 2 more answers
The diagram above indicates the location of an enlarged detail to show more information than the blueprint permits. They also ca
mezya [45]

Answer:

c.  Detail designation

Explanation:

the question "enlarged detail to show more information", That has a detail indicator area circle. It's usually more of a square or rectangle not a circle. Circles are good for detailing landscape.

"They also can indicate when a section of the house is being enlarged."  Sections details use that symbol but have a section indicator line. Also grid and column indicators use that symbol.

7 0
2 years ago
Click this link to view O*NET’s Work Styles section for Accountants. Note that common work styles are listed toward the top and
Tanzania [10]

Answer:

dependability  

attention to detail

integrity

analytical thinking

Explanation:

6 0
2 years ago
Read 2 more answers
Other questions:
  • The pistons of a V-6 automobile engine develop 226.5 hp. If the engine driveshaft rotational speed is 4700 RPM and the torque is
    14·1 answer
  • Coal fire burning at 1100 k delivers heat energy to a reservoir at 500 k. Find maximum efficiency.
    6·1 answer
  • A seawall with an opening is used to dampen the tidal influence in a coastal area (and limit erosion). The seawall is 2.5 m long
    11·1 answer
  • A household refrigerator that has a power input of 450 W and a COP of 1.5 is to cool 5 large watermelons, 10 kg each, to 8 C. If
    7·1 answer
  • An approach to a signalized intersection has a saturation flow rate of 1800 veh/h. At the beginning of an effective red, there a
    15·1 answer
  • The water of a 14’ × 48’ metal frame pool can drain from the pool through an opening at the side of the pool. The opening is abo
    13·1 answer
  • If you are a subcontractor in the leather and apparel industry, you might make any of the following items EXCEPT which
    7·1 answer
  • Need help with these 3 ez questions pls help me.
    6·1 answer
  • Cody’s car accelerates from 0m/s to 45 m/s northward in 15 seconds. What is the acceleration of the car
    14·1 answer
  • The formation of faults in Earth's crust is an effect. What causes faults to form in the crust? Global Positioning System sensor
    9·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!