sujatha kola
sujatha kola
8 years ago

Given an array of integers, find any one combination of four elements in the array whose sum is equal to a given value X. For example, if the given array is {10, 2, 3, 4, 5, 9, 7, 8} and X = 23, then your function should print “3 5 7 8” (3 + 5 + 7 + 8 = 23).


This Question Belongs to User Ask Question >> Miscellaneous

Join The Discussion

Comments ( 1 )

  1. Sudhakar Prajapati
    Sudhakar Prajapati :
    8 years ago

    Output : 20, 30, 40, 1

Related User Ask Questions