hi i have the next task to solve.
* We are given 5 integer numbers. Write a program that checks if the sum of some subset of them is 0.
* Example: 3, -2, 1, 1, 8 1+1-2=0.
do u have any other ideas then writing all the 31 if statements?
checho 0 Light Poster
apegram 302 LINQ! Team Colleague
checho 0 Light Poster
checho 0 Light Poster
apegram 302 LINQ! Team Colleague
apegram 302 LINQ! Team Colleague
apegram 302 LINQ! Team Colleague
Geekitygeek commented: ncie method, and great way to demonstrate how to get there +1
ddanbe commented: Great work! +6
Geekitygeek 480 Nearly a Posting Virtuoso
ddanbe commented: Thanks for pointing this out, agree about apegram. +6
ddanbe 2,724 Professional Procrastinator Featured Poster
checho 0 Light Poster
Be a part of the DaniWeb community
We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.