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]
4 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]4 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
A low-level language has a low level of ___________ because it includes commands specific to a particular cpu or microprocessor
Studentka2010 [4]
Command Specifics to a cpu or a microprocessor it is code <span />
7 0
3 years ago
All sensitive media on a laptop should be encrypted.
Inessa05 [86]

true very very true it could get stolen if not (well either way) but it is better encrypted

8 0
3 years ago
What service uses a private cloud in conjunction with a web browser or downloaded client software to access desktop software?
dmitriy555 [2]

Answer:

The answer is Remote desktop services.

Explanation:

What service uses a private cloud in conjunction with a web browser or downloaded client software to access desktop software?

The answer is Remote desktop services.

Desktop virtualization is a software technology that separates the desktop environment and associated application software from the physical client device that is used to access it.

Desktop virtualization can be used in conjunction with application virtualization and user profile management systems, now termed "user virtualization", to provide a comprehensive desktop environment management system. In this mode, all the components of the desktop are virtualized, which allows for a highly flexible and much more secure desktop delivery model. In addition, this approach supports a more complete desktop disaster recovery strategy as all components are essentially saved in the data center and backed up through traditional redundant maintenance systems.

6 0
3 years ago
How many generations of computers languages have there been since the middle of the 20th century
Molodets [167]
<span>There are 4 computer language generations. First is the first generation language or 1GL, second is the second-generation languages or the 2GL, next is the third-generation languages or the 3GL, and the last is fourth-generation languages or the 4GL.</span>
4 0
3 years ago
Read 2 more answers
Exercise 1-12 <br> This information is for Windsor, Inc. For the year ended December 31, 2017
Agata [3.3K]

Answer:

Please check the attachment.

Explanation:

Net change in cash, is the net increase in the cash from previous year which is 11900 here, and since the cash in hand is 17200, the net increment is 17200-11900 = 5300 from past year.

And the Cash forecast depends upon cash in hand, and which is 17200, and this is while disregarding future profit.

Rest of the details are in the file attached.

Download xlsx
8 0
3 years ago
Other questions:
  • Consider the following list.
    5·1 answer
  • How can I lag my computer as if it had bad internet?
    15·1 answer
  • 4.2 Code Practice: Question 1
    14·1 answer
  • The copy constructor for a class is called____________.
    14·1 answer
  • WILL GIVE BRAINLEST!!!!!!!! 10 POINTS!!!!
    5·2 answers
  • How to make a computer
    14·2 answers
  • A radio and communications security repairer is responsible for both radio and satellite communication systems.
    6·2 answers
  • Rudy accidentally sent a sensitive work report to a personal friend named James instead one of his co-workers, who is also named
    6·1 answer
  • If you are connected to a network that uses DHCP, and you need to terminate your Windows workstation's DHCP lease, which command
    12·1 answer
  • A vpn is used primarily for which purpose?
    10·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!