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 360 kg/min stream of steam enters a turbine at 40 bar pressure and 100 degrees of superheat. The steam exits the turbine as a
Brrunno [24]
Answer:
skskkdkdkfkgkgkgkkgkgkgigooigigi lol
Explanation:
Oof
7 0
2 years ago
A teenager was pulling a prank and placed a large stuffed penguin in the middle of a roadway. A driver is traveling on this leve
Anvisha [2.4K]
Whats the question????
3 0
3 years ago
‼️Will mark brainliest‼️
Slav-nsk [51]
YAll don’t tell my cousin I’m hacking her school resources because I got a 0 in a test and she got a 100

4 0
3 years ago
What do we need to do to get CO2 emissions all the way to zero?
Svetlanka [38]

Answer:

A key element is powering economies with clean energy, replacing polluting coal - and gas and oil-fired power stations - with renewable energy sources, such as wind or solar farms. This would dramatically reduce carbon emissions. Plus, renewable energy is now not only cleaner, but often cheaper than fossil fuels

Explanation:

here is your answer if you like my answer please follow

3 0
2 years ago
A gas stream flowing at 1000 cfm with a particulate loading of 400 gr/ft3 discharges from a certain industrial plant through an
Makovka662 [10]

<u>Solution and Explanation:</u>

Volume of gas stream = 1000 cfm (Cubic Feet per Minute)

Particulate loading = 400 gr/ft3 (Grain/cubic feet)

1 gr/ft3 = 0.00220462 lb/ft3

Total weight of particulate matter = 1000 \mathrm{cfm} \times 400 \mathrm{gr} / \mathrm{tt} 3 \times .000142857 \mathrm{lb} / \mathrm{ft} 3 \times 60=3428.568 \mathrm{lb} / \mathrm{hr}

Cyclone is to 80 % efficient

So particulate remaining = 0.20 \times 3428.568 \mathrm{lb} / \mathrm{hr}=685.7136

emissions from this stack be limited to = 10.0 lb/hr

Particles to be remaining after wet scrubber = 10.0 lb/hr

So particles to be removed = 685.7136- 10 = 675.7136

Efficiency = output multiply with 100/input = 98.542 %

4 0
3 years ago
Other questions:
  • The Fibonacci sequence 1, 1, 2, 3, 5, 8, 13, 21…… starts with two 1s, and each term afterward is the sum of its two predecessors
    8·2 answers
  • System grounding on a power system means electrically connecting the __?__ of every wye-connected transformer or generator to ea
    12·1 answer
  • Kirchoff's Law states that, by the time current has returned to its source, all
    13·2 answers
  • What is the capacity of the machine in batches?
    10·1 answer
  • The slope of a moment diagram is the load. a)-True b)-False
    8·1 answer
  • Traditional password entry schemes are susceptible to "shoulder surfing" in which an attacker watches an unsuspecting user enter
    13·1 answer
  • Different types of steels contain different elements that alter the characteristics of the steel. For each of the following elem
    6·1 answer
  • QUESTIONS
    12·1 answer
  • 9. What is a whip check?
    12·1 answer
  • At least 1 sources must be from an organization website (.org) and 1 source must be from and educational website .edu) Do not us
    7·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!