siva nagarjuna

siva nagarjuna

  • NA
  • 26
  • 17k

write this program in c#?

Aug 22 2016 6:51 AM
Write a program that outputs all possibilities to put + or - or nothing between the numbers 1,2,…,9 (in this order) such that the result is 100. For example 1 + 2 + 3 - 4 + 5 + 6 + 78 + 9 = 100.
 
 
array of lements=[1,2,3,4,5,6,7,8,9] 
use 3 operators: + - and nothing(78) means nothing between 7 and 8.
print all combinations of elments such that whose sum is 100. 

Answers (2)