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
Alex_Xolod [135]
3 years ago
9

This code initially states that n=10 and f=n. Once the code enters the while loop, it stays in the while loop until the conditio

n n>1 is not true. n is subtracted by 1 every iteration. This means that f = 10*9*8*7*6*4*3*2*1. With 9,8,7,6,5,4,3,2, and 1 being repeated n values. The disp (f) command displays the value of f after the while loop, which is equal to (n!).
Engineering
1 answer:
zavuch27 [327]3 years ago
6 0

Answer:

  1. n = 10;
  2. f = n;
  3. while(n > 1)
  4.    n = n - 1;
  5.    f = f * n;
  6. end
  7. disp(f);

Explanation:

The solution code is written in Matlab.

Firstly, we initialize n to 10 and set n to f variable (Line 1-2).

Next, create a while loop that will continue to loop until n is equal or smaller than one. In the loop, decrement n by one and multiply n with current f_variable.

At last display value of f. The output is  3628800.

You might be interested in
Counter argument for why engineers dont make a positive change in the world.​
egoroff_w [7]

Answer:

They don't make a positive change in the world because they have made mistakes that aren't able to be made fixed and there are a lot of engineers who haven't study enough and know the important basis of coming to engineer.

3 0
3 years ago
Evan notices a small fire in his workplace. Since the fire is small and the atmosphere is not smoky he decides to fight the fire
Norma-Jean [14]

Answer:

not calling the firemean

Explanation:

7 0
3 years ago
Are designed to make it easier for employees to get health and safety Information about
iren [92.7K]

Answer:

what the options

Explanation:

4 0
3 years ago
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
rusak2 [61]

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;

 

}

5 0
3 years ago
Technician A says that a defective crankshaft position sensor can cause a no spark condition technician B says that a faulty ign
Aliun [14]
Both tech distributor ignition
5 0
3 years ago
Other questions:
  • Liquid water enters an adiabatic piping system at 15°C at a rate of 8kg/s. If the water temperature rises by 0.2°C during flow d
    12·1 answer
  • A harmonic oscillator with spring constant, k, and mass, m, loses 3 quanta of energy, leading to the emission of a photon.
    13·1 answer
  • What is the correct statement regarding the stress over the section of a shaft in torsion?
    13·1 answer
  • A mechanical system comprises three subsystems in series with reliabilities of 98, 96, and 94 percent. What is the overall relia
    10·1 answer
  • Air enters a counterflow heat exchanger operating at steady state at 27 C, 0.3 MPa and exits at 12 C. Refrigerant 134a enters at
    5·1 answer
  • Based on the scenario, which type of engineering identifies Greg's role in Ethiopia?
    15·1 answer
  • What are the major types of stone used in construction? How do their properties differ? What sequence of operations would be use
    10·1 answer
  • Technician A says that acid core solder should be used whenever aluminum wires are to be soldered.
    14·1 answer
  • How to plot 0.45 gradation chart for sieve analysis ?
    12·1 answer
  • A high compression ratio may result in;
    13·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!