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
If we are transferring data from a mobile device to a desktop and receive an error message that the mobile device has stopped co
Katena32 [7]

The root cause of the error  when transferring the data from mobile device to the computer is maybe the port on the system is either damaged or not seeing the device.

<h3>Which device is used to transfer data from one place to another?</h3>

The device that is often used is known to be an External Hard Drives or the use of Media Devices for big Data Transfers.

Note that Copying data into an external hard drives, flash drives, or other kinds of storage devices is said to be another way that is often used in the transfer of data.

Moving specific files or backing up the full system from one computer to another is known to be very quick and easy.

Therefore, The root cause of the error  when transferring the data from mobile device to the computer is maybe the port on the system is either damaged or not seeing the device.

Learn more about error message from

brainly.com/question/25671653

#SPJ1

6 0
1 year ago
Many PC operating systems provide functionality that enables them to support the simultaneous execution of multiple applications
guapka [62]
The answer is multitasking. This is when the OS always programs to share resources to run at the same time.

If the applications were running on separate CPUs, then it would be multiprocessing.
3 0
3 years ago
What is the advantage of learning through story compared to learning through personal experience?
Artemon [7]

Answer:

I think the answer would be D

Explanation:

it just seems to make the most sense

7 0
3 years ago
Read 2 more answers
You have just starting working at Quantum Company. As a new programmer, you have been asked to review and correct various pseudo
Alecsey [184]

Answer:

The correct answer to the following question:

while sub < SIZE AND foundIt = "N"

Explanation:

Firstly, we start the pseudocode after that set the variable sub to 0 and size to 1 of num type and also set a num type array VALID_ITEM[5] and its elements are 27,53,84,89,95.

Than set string type variable foundIt to "N", then we set a while loop and correct its condition is "< SIZE AND foundIt = "N" ".

Than starts if condition which is "item = VALID_ITEM[sub]", if the condition is true than foundIt = "Y", after that endif.

Than increment the variable sub, after that endwhile, after this, we start if condition which is "foundIt = "Y" " if the condition is true then output "Valid item number" or else "Invalid item number", and then we endif and after all stop the pseudocode.

8 0
4 years ago
The bus width and bus speed together determine the bus's ____ or bandwidth; that is, the amount of data that can be transferred
stealth61 [152]
Another name for amount of data transferred in a given amount of time is "throughput".
5 0
4 years ago
Other questions:
  • Su
    6·1 answer
  • Which of the following is the formula used to calculate the risk that remains after you apply controls? a. ALE=SLExARO b. Total
    9·1 answer
  • Write a pseudocode that will take marks of physics, chemistry and math as input, calculates the average and displays output.
    7·2 answers
  • What will the following segment of code output?
    7·1 answer
  • You do not need to remove the lead weights inside tires before recycling them. A) TrueB) False
    15·1 answer
  • A group of students writes their names and unique student ID numbers on sheets of paper. The sheets are then randomly placed in
    15·1 answer
  • Which line is most likely an error? A-“hello” B-hello C-“100” D-100
    6·2 answers
  • Use the drop-down menus to complete the steps to convert a macro to VBA.
    8·1 answer
  • The firewall protects a computer or network from network-based attacks along with _____________ of data packets traversing the n
    8·1 answer
  • Which of the following was the first computer-animated film to win animated film to win an academy award?
    14·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!