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
Roman55 [17]
4 years ago
10

Write a Scheme function called "sum" which takes an input function func and a nonnegative number n and outputs the value

Computers and Technology
1 answer:
solong [7]4 years ago
7 0

Answer:

function sum(number) {

      if (number == 1) {

             return 1;

      }

      return number + sum(number -1);

}

Explanation:

This is a recursive function, it means that is a function that calls itself for example: if you call the function with sum(5) the process is :

sum(5)

   |______ 5 + sum(4)

                           |_______ 4 + sum(3)

                                                       |______ 3 + sum(2)

                                                                                   |_____2 + sum(1)

                                                                                                        |_____ 1

                                                                                                 

the result is 1+2+3+4+5 = 15

You might be interested in
Which statement best describes the Tell Me feature in PowerPoint 2016?
GrogVix [38]

Answer:

It provides detailed information about particular tasks within the program

3 0
3 years ago
What type of html list will automatically place a list marker, or bullet point, indicator in front of each item? group of answer
scZoUnD [109]

Main Answer:What type of html list will automatically place a list marker, or bullet point, indicator in front of each item? group of answer choices description l <u>unordered list</u>

Sub heading:

How many types of html list and explain?

Explanation:

1.There are three types

unordered list

ordered list

description list

2.unordered list: is used to group a set of related items in no particular order.

Reference link:

https://brainly.com

Hashtag:

#SPJ4

3 0
2 years ago
Select all that apply.
professor190 [17]
Social worker and legal aid worker

4 0
3 years ago
Read 2 more answers
What is the target audience of an ad?
GuDViN [60]

All ages

Explanation:

It is a toothpaste advert which most people use. It will also appeal to people who want to get whiter teeth

8 0
3 years ago
Copy the 10 statements as they appear below into your journal.
AURORKA [14]

B A C D C A B B CDAAD

4 0
3 years ago
Read 2 more answers
Other questions:
  • You want to register the domain name ABCcompany.org, but the registration service is not allowing you to do that. What's the mos
    10·1 answer
  • What is the difference between a denial-of-service attack and a distributed denial-of-service attacks? which is potentially more
    10·1 answer
  • ________ hackers break into systems for non-malicious reasons such as to test system security vulnerabilities. black-hat gray-ha
    10·1 answer
  • I want to customize my company's logo, name, address, and similar details in all my business documents what option should use?
    12·1 answer
  • Assume that isIsosceles is a bool variable, and that the variables isoCount, triangleCount, and polygonCount have all been decla
    11·1 answer
  • An interface does not have ____.
    13·1 answer
  • Write a C program to input a character, then check if the input
    5·1 answer
  • Please help with this
    8·1 answer
  • PACIFIC NORTHWEST
    10·1 answer
  • Cyber vulnerabilities to dod systems may include
    12·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!