Advertisement
Guest User

Untitled

a guest
Feb 10th, 2015
222
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C# 0.76 KB | None | 0 0
  1.             foreach (var number in numbers)
  2.             {
  3.                 if (number < 0)
  4.                 {
  5.                     for (int index = 0; index < numbers.Length; index++)
  6.                     {
  7.                         if (possibleSums[index])
  8.                         {
  9.                             possibleSums[index] = true;
  10.                         }
  11.                     }
  12.                 }
  13.                 else
  14.                 {
  15.                     for (int index = possibleSums.Length - 1; index >= 0; index--)
  16.                     {
  17.                         if (possibleSums[index])
  18.                         {
  19.                             possibleSums[index] = true;
  20.                         }
  21.                     }
  22.                 }
  23.             }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement