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
Vedmedyk [2.9K]
2 years ago
6

Write a recursive function named canmakesum that takes a list of * integers and an integer target value (sum) and returns true i

f it is * possible to have some set of values from the list that sum to the * target value.
Computers and Technology
1 answer:
valentinak56 [21]2 years ago
7 0

// Java program to find sum of array

// elements using recursion.

class Test {

   static int arr[] = { 1, 2, 3, 4, 5 };

   // Return sum of elements in A[0..N-1]

   // using recursion.

   static int findSum(int A[], int N)

   {

       if (N <= 0)

           return 0;

       return (findSum(A, N - 1) + A[N - 1]);

   }

   // Driver method

   public static void main(String[] args)

   {

       System.out.println(findSum(arr, arr.length));

   }

}

You might be interested in
Convert (520)10 into base 16​
kakasveta [241]
The base-10 value of 52010 is equal to base-16 value of 20816.
3 0
3 years ago
Read 2 more answers
How can financial planning help you plan for your future education
Andrews [41]
It helps you in future times. For school work,you have to be ready.
6 0
4 years ago
If you attempt an edgeunity quiz is your latest attempt the one counted?
tekilochka [14]

Answer:

Hello

Explanation:

Hello profile picture of a nub how are you doing today?

8 0
3 years ago
How do you feel about the Furry Fandom?
gtnhenbr [62]
When you don’t know who or what that is, and I pop- lol I need a life
8 0
3 years ago
When it comes to wireless channels, which channels never overlap?
krok68 [10]

Answer:

In the 2.4 GHz band, 1, 6, and 11 are the only non-overlapping channels. Explanation:

Selecting one or more of these channels is an important part of setting up your network correctly.

6 0
2 years ago
Other questions:
  • Whats the Sioux City school wifi?
    15·2 answers
  • What is the purpose of the print area feature​
    11·1 answer
  • How does electricity work in phones?
    14·1 answer
  • You have just built a new system from scratch. you turn the computer on but the system boot fails and sounds a beep code. what m
    15·1 answer
  • Um can anyone who is really into science and physics answer this question
    7·1 answer
  • The game often becomes stuck on landscape mode when tilting the device during gameplay, which cuts off some peripheral text. A w
    8·1 answer
  • Currently, this program will add 6 and 3 together, output the math problem and output the answer. Edit this code so that a rando
    9·1 answer
  • In three to five sentences, describe how you would move a slide from the end of the presentation to the second slide.
    7·1 answer
  • Mingji is working to transfer photos from her digital camera to her computer. While
    11·1 answer
  • Write a Dice Game program that generates two random dice values between 1 and 6 for you, and 2 for the computer. You get to roll
    5·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!