Question: I am trying to sum every other digit in the card number by doing this: 

```
/*
Return the sum of the odd-place digits.
*/

public static int sumOfoddPlace(long number)
{
    int maxDigitLength = 16;
    int sum = 0;
    for (int i = 1; i <= maxDigitLength; i++)
    {
        if (i % 2 == 1)
        {
            sum = sum + (int)(number % 10);
        }
        break;
    }
    return sum;
}

```

All I get is 6. The sum I am looking for is supposed to be 37.

Answer: 
You're breaking out of the loop on the very first iteration only. So, you won't go past to another iteration.

However, removing the `break` too won't solve your problem. `number % 10` will always give you the last digit of the number, and not every alternate number. You should follow this approach:

* `num % 10` - Will give you last digit.
* Then update the `num` by trimming off the last 2 digits.
* Repeat
I haven't seen the minimum solution yet, so here goes:

```
public static int sumOddDigits(long input) {
    int sum = 0;

    for (long temp = input; temp > 0; temp /= 100) {
        sum += temp % 10;
    } 
    return sum;
}

```

You don't need to divide by 10 and check if it's an even number, you can just divide by 100 every time.

Demo: <http://ideone.com/sDZfpU>