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
son4ous [18]
3 years ago
5

You wrote a program to find the factorial of a number using recursion. 4! =

Computers and Technology
1 answer:
Len [333]3 years ago
8 0

Answer:

24

Explanation:

Anything "factorial" is the result of multiplying the number by itself and all numbers below it, so:

4! = 4 × 3 × 2 × 1 = 24

There's no other info for this question so I assume you just wanted the answer, but as an example of a program here's a function that would work it out for you by using recursion in javascript, to use this you would call factorial(4) like at the bottom:

function factorial(num) {

 if (num < 0)  

       return -1;

 else if (num == 0)  

     return 1;

 else {

     return (num * factorial(num - 1));

 }

}

factorial(4);

You might be interested in
Any Body have a zoom class goin on<br> i wanna bomb
Norma-Jean [14]

This site is only for education related questions. You should only answer or ask questions. That's what we are here for. Whoever is reading this answer, please spread it to stop people from zooming, hurting others, or just posting non-related to education questions. Thank you.

6 0
3 years ago
How do i install windows 7 on virtual machine?​
liberstina [14]

Choose Start→All Programs→Windows Virtual PC and then select Virtual Machines. Double click the new machine. Your new virtual machine will open onto your desktop. Once it's open, you can install any operating system you want.

3 0
3 years ago
Which domain will redirect you to the amazon website?
Vinvika [58]

Answer:

Amazon.com

Explanation:

Every online business has a domain name that redirects to thier website usually has this format https:// of http:// followed by the domain name.

3 0
3 years ago
When using a line graph, why is it inportant to only graph 1 - 3 series of data?. A. A line graph in Microsoft Excel will not al
ElenaW [278]
The most necessary point you need to follow when using a line graph, is to make your graph readable. So, the reason why is it inportant to only graph 1 - 3 series of data is that more than 3 series of data causes too many lines on the graph, which makes ti confusing to read. The last option is the correct one.
8 0
3 years ago
How many assignments would you have failed without brainly?<br><br> lol.
svetoff [14.1K]
How many assignments would I have failed without brainy? Lol

ALL OF THEM
7 0
3 years ago
Other questions:
  • You have been tracking your exercise routine, which involves running, lifting weights, yoga, and stretching. You want to see wha
    15·2 answers
  • When did Kodak introduce film photography to the commercial market?
    10·2 answers
  • The definition of an "analog device" is that it is a type of _____.
    5·1 answer
  • If you were going to construct a table that only included shape names with number prefixes, which shape would you include
    11·1 answer
  • What are the basic tools for coding HTML manually?
    10·2 answers
  • Which port-authentication network access control standard forces devices to go through a full authentication, authorization, and
    13·1 answer
  • Which online resource is usually not free?
    10·2 answers
  • How do i confirm my email address on here
    7·2 answers
  • Impaired drivers are one of the many risks drivers face on the Highway Transportation System. List 3 signs that a driver could b
    10·2 answers
  • Which option identifies the programming paradigm selected in thr following scenario? A student is writing a science fiction stor
    12·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!