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
As time goes on, technology is likely to _______. A. Increase in complexity b. Decrease in complexity c. Stay at the same comple
amid [387]

Answer:

The answer to this question is the option "A".

Explanation:

In this question, the answer is Increase in complexity because, In computer science, the computerized or simply complexity is an algorithm. In this algorithm, the number of the resource is required for moving it (a quality separate to “complexity” in a conventional reason). So in this question the answer is option A that is  Increase in complexity.

5 0
3 years ago
Which rotation speed is not a typical spindle rotation speed for magnetic hard drives?3100; 5400; 7200; 10000
Hitman42 [59]

Answer:

5,400 because it turns at the right speed, but if it is too fast or too slow, it will not perform at it's fullest potential. Such as speed and storage.

3 0
2 years ago
All of the following are incentives proprietary schools use to attract a student except
IRISSAK [1]
Idk what the answer choices are
4 0
3 years ago
Read 2 more answers
Ginny just enrolled in a C-SNP that uses the post-enrollment verification method. When will the plan send her a termination noti
Zolol [24]

The plan will be sent to her for a termination notification letter at the end of her first month of her enrollment.

<h3>What is a notification of termination?</h3>

A notice of termination is known to be that which is often given to an employee or a person and it states that it is the end of their employment or other contract.

Hence, The plan will be sent to her for a termination notification letter at the end of her first month of  her enrollment.

Learn more about verification method from

brainly.com/question/17274244

#SPJ1

6 0
2 years ago
Successful Web sites such as StumbleUpon ( www.stumbleupon) and Digg ( www.digg) use ____ by inviting their visitors to vote on
aliina [53]

Answer:

"Crowdsourcing" is the correct answer for the above question.

Explanation:

  • Crowdsourcing is a term from which any organization advertises the thinks or can get the ideas or solutions for any particular problem.
  • It is a term that refers to the problem to the number of solvers to achieve the result correct and frequent.
  • For example, If anyone wants to prepare the two websites. Then he assigns the works to the number of people and the works done faster with the help of this.
  • The above question states that some websites can be successful with the help of the type of work. They are successful with the help of crowdsourced work. Because it saves time. So the answer is Crowdsourcing.
3 0
3 years ago
Other questions:
  • Write a function, factors, that takes an integer n, and returns a list of values that are the positive divisors of n. Note: 0 is
    13·1 answer
  • Due to the internal style sheets of some browsers, your website may look different to someone who is using firefox as opposed to
    11·1 answer
  • Which device or software application detects errors in system configurations?
    8·1 answer
  • Your health insurance company gives you a discount if you wear a fitness-tracking bracelet. After wearing it for a few months, y
    5·1 answer
  • In controlling network traffic to minimize slow-downs, a technology called ________ is used to examine data files and sort low-p
    15·1 answer
  • When Clara accesses the programs and documents on her computer by way of icons, she is said to be employing
    15·1 answer
  • Asian-American men are often represented in the media as _____.
    8·2 answers
  • Which elements of a myth appear in this story from early babylon
    14·1 answer
  • Npesta kenos reaction
    13·2 answers
  • QUESTION 44 To determine whether a character entered is a letter of the alphabet, use the ________ function. isdigit fromkeyboar
    6·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!