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
What is a client server network and its features?​
maks197457 [2]

Answer:

A client-server network is the medium through which clients access resources and services from a central computer, via either a local area network (LAN) or a wide-area network (WAN), such as the Internet. ... A major advantage of the client-server network is the central management of applications and data.

8 0
3 years ago
Which of these is the function of a modeler?
Liono4ka [1.6K]

Answer:

Create 3D assets from sketches

Explanation:

A modeler Job is to model all of the 3D/2D assets needed to obtain the final result wanted by the developers. The modeler creates the assets from sketches or images provided to him according to the theme.

5 0
3 years ago
Read 2 more answers
Can someone help me
Shtirlitz [24]
If u dont have anything important on there reboot it if you do choice 5
8 0
3 years ago
PLEASE HELP LAST QUESTION: Which of the following tags is used to anchor a link (options are anchor, link, id, none of the answe
Ahat [919]
None of the above and this has to be 20 characters so yea
7 0
3 years ago
Given the following code char a[2][4] = { { 'c', 'a', 'r', 'b' }, { 'i', 'k', 'e', '\0' } }; char *p = &a[0][0]; while (*p !
adell [148]

Answer:

You'd get a compiling error.

Explanation:

Since this code is presumably written in C++, it doesn't include an "int main()", and without it you'll have a compiling error when you create functions. Since the start of a C++ program is looking for "int main()" and one doesn't exist, the program cannot compile.

Since the only function here is the while statement, then that's what the compiler will scream at you for. If you put all of this code within an "int main()", you'll no longer have a compiling error, and you'll have "carbike" written to the console.

I hope this explanation helps! You're welcome!

7 0
2 years ago
Other questions:
  • What device did vladimir Zworykin use to develop television technology that resulted in the technology shifting from a mechanica
    13·1 answer
  • The Beaufort Wind Scale is used to characterize the strength of winds. The scale uses integer values and goes from a force of 0,
    10·1 answer
  • Tim is creating a page to display his poker club’s set of rules. He has main categories and subcategories along with about a par
    12·1 answer
  • Plagiarism is when you try to pass of someone else's words as your own. What else does it include? Select all that apply. Please
    5·1 answer
  • Mention 5 advantages of internet​
    8·1 answer
  • Brainly bug <br> i had to take a pic because it said it was rude
    10·1 answer
  • Who first demonstrated the computer mouse ?
    11·1 answer
  • Write a program that will input two numbers and print the larger number on the screen.
    13·1 answer
  • 3) Given that HSI (360, 0.000, 1.000), What is the equivalent RGB<br> color?
    12·1 answer
  • "using this type of communications channel, several users can simultaneously use a single connection for high-speed data transfe
    12·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!