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
andriy [413]
3 years ago
11

Write a MATLAB code which asks a user for an integer number and computes the factorial of that number. Use while loop to create

the code.
Computers and Technology
1 answer:
ivann1987 [24]3 years ago
7 0

Answer:

my_int=input('Enter an integer to calculate its factorial: ');

i=1;%Counter to the while loop

r=1;%To keep the result

while i<=my_int

   r=r*i;

   i=i+1;

end

display('The result is:')

r

Explanation:

The factorial is the multiplication of all positive integers from 1 to n , my_int is the value of n in the program, in a while loop you need a condition that is met until all the positive integers have been multiplied, i is the counter that allows this (starts has one and is increasing by one till it gets the value of n)  and also is useful to make the multiplication and r keeps the result of each step until the condition stop being met and then the program the program leaves the loop and displays the solution.

You might be interested in
Which statement describes one drive?
Ipatiy [6.2K]
One drive is microsofts storage service for holding files in the “cloud”. It offers users a simple way to store and sync various types of files with other people/devices on the internet.
6 0
3 years ago
A researcher develops a new instrument to measure coping skills and conducts a pilot study to compare the new tool with an exist
alexira [117]

Answer:b)convergence.

Explanation: Convergence has the basic meaning as when two or more unit of anything meet to converge or join. In the research , the different types of the tools are brought togather and skills and compare them.The measurement is done through the tools which has the already defined parameters.

Thus this concept is the example of the convergence because the tools are being converged and compared.so, the correct answer is option (B) and other option are incorrect because they have the technique of the contrasting and separation and reading respectively.

3 0
3 years ago
Ryan needs to see the space available to insert content on a slide in his presentation. Which feature of a presentation program
MariettaO [177]

Answer:

Layout

Explanation:

answer exists on

brainly.com/question/3749015

5 0
3 years ago
Question 4 Multiple Choice Worth 5 points)
Morgarella [4.7K]

The correct answer is Boolean logic.

Booleans are true or false statements.

An example of a while loop is:

while 1 < 5:

   #do something.

The Boolean statement is 1 < 5 which evaluates to true because 1 is less than 5.

I hope this helps!

3 0
3 years ago
What is the first step in devising security services and mechanisms?
N76 [4]

Solution:

The first step in devising security services and mechanisms is to develop a security policy.

A security policy is a document that states in writing how a company plans to protect the company's physical and information technology (IT) assets. A security policy is often considered to be a "living document", meaning that the document is never finished, but is continuously updated as technology and employee requirements change. A company's security policy may include an acceptable use policy, a description of how the company plans to educate its employees about protecting the company's assets, an explanation of how security measurements will be carried out and enforced, and a procedure for evaluating the effectiveness of the security policy to ensure that necessary corrections will be made.

This is the required answer.

4 0
3 years ago
Read 2 more answers
Other questions:
  • Which graphic design tool allows you to lay images on top of one another? A. Layers B. Selection C. Drawing D. Color
    10·2 answers
  • What device brocasts all data packets to other nodes on a network?
    5·1 answer
  • Which of the file names below follows standard file naming convention
    13·1 answer
  • Side mirror using convex mirror or concave mirror?​
    5·2 answers
  • When did the digital revolution begin
    10·1 answer
  • How can i take out a random (double) number in between 5.0 to 15.0 in c++?
    7·1 answer
  • Dallas is an analyst at an online retailer. He is great at creating representative diagrams showing the relationships between cu
    12·1 answer
  • Why is it important to put the most specific case first? What types of errors does it help avoid?
    11·1 answer
  • What is the largest place value in a 12 bit binary number?
    10·1 answer
  • If you were a hackathon team manager, how could you best address the conflict created by having more volunteers than open roles
    6·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!