Hot answers tagged

1

Once the program has determined if the sum should increase by current_digit or something else, the something else takes a complicated approach. Instead of nesting another loop to work out multi-digit numbers, realize that 'multiply' can only have values in the range of 0 to 18. Consider this simpler code: if (j % 2 != 0) { int multiply = current_digit * ...


Only top voted, non community-wiki answers of a minimum length are eligible