 The first thing you'll need to know is how to create a long integer variable. The integers we've been using are 32 bits long, and that won't hold a 16-digit credit card number. So this program won't compile properly because this 16-digit number is too big to fit into an int data type. Instead, you need to specify that the data type is long and you have to put a capital L at the end of the number. That goes for input as well. Instead of saying next int, you need to say next long and you have to assign it to a long variable. Now it'll compile fine. And when we run the program, it prints out perfectly and when the user enters a credit card number, it works fine. Users don't have to type a capital L at the end of the number. The next long method takes care of it for them. In the credit card program, you're going to need to write methods to sum all the odd digits and then to sum the doubled even digits. The key to both of these is to be able to extract individual digits from a number. Let's think about how to get the individual digits. We'll start with a smaller number like 651324 and our sum so far is going to be zero. The trick is to divide by ten. The quotient of that is 65132 and the remainder is four. That's the right most odd place. Four plus zero is four. And here are the remaining digits. We'll repeat this. We'll take 65132 and divide by ten. The quotient is 6513. We're not going to deal with the remainder. That's the digit that we want to skip. Instead, we'll take the 6513, divide that by ten, which gives us 651 and now we want the remainder three. Three plus four is seven. We take the 651, divide it by ten to get 65 and ignore the remainder. We want to skip it. Take the 65, divide it by ten, which gives us six with a remainder of five and that's a digit that we do want. Five plus seven is twelve. We take the six, divide by ten and get zero. Skip the remainder. Take the zero, divide by ten and we get zero. When we get to zero, we've finished and there is the sum of the odd place digits in the number. What about the even digits? We'll do something similar. We're going to start with our number as 651324 and we're going to have our quotient and our remainder and our sum, which is going to be zero. The trick here is going to be to take this and divide by ten first to get 65132. Now we'll do the same process that we did before. 65132 divided by ten is 6513. Our remainder is two. We double that and add to the sum. We take 6513, divide that by ten to get 651 and ignore the remainder. We're skipping it. Take the 651, divide it by ten, get 65. The remainder is one. One times two is two plus four is six. We take the 65, divide by ten and get six and ignore the remainder. Take the six, divide by ten and get zero with the remainder of six. Six times two is twelve. We add those digits to get three. Three and six is nine. Since we've hit zero, we're done. What we have here can be expressed as a while loop. As long as the number is not zero, we'll do our divisions by ten and either take the remainder or not take it. Here's the pseudo-code for getting the sum of the odd digits and here's the pseudo-code for getting the sum of the even digits. There's another thing that we can do to make the math a little bit simpler. Our number was 651324 and our sum was zero. We took mod ten, which gives us our four, and added that onto the zero. Instead of dividing by ten twice, what we can do is we can take the whole number 651324 and then divide it by 100. That gives us 6513, which puts us right in place for the next digit we want. We'll take 6513 mod ten, which gives us a three, and we'll add that onto four. Four plus three is seven. And then we'll divide this number by 100, which gives us 65. We'll take that mod ten, which gives us a five, plus seven is twelve, divide by 100, which gives us a zero. And once we get to zero, we've finished. So that's another way that you can do the operation. You can take a mod and divide by 100, or you can take the mod and then divide by ten twice.