Now we're ready to translate our steps to code. We'll take our algorithm shown here and write it as comments so that we can translate line by line. We start with a function declaration written around our steps. If you were doing this yourself, you could add the algorithm as comments in your editor without leaving space for code. The first thing we need to do is check if N is less than or equal to 1. We're checking a condition and deciding what to do based on that, so we want an if statement. if (N <= 1) we want to do something, otherwise we want to do everything after it. If so, we want to answer no, and that is a return statement. We want to leave this function immediately since we know our answer and we don’t want to do anything else, so we return 0. Recall that zero means false or no, and non-zero numbers, generally one, mean true or yes. Next we want to count from 2 to N and call each number that we count i. Counting corresponds to a for loop. The number we want to count is i so we're going to declare int i = 2. We want to count to N exclusive, so we chose the conditional statement i < N. Also we're counting by one so our increment statement is going to be i++. The body of the loop will be the steps we want to take for each number that we count. The first of those is check if N mod i is equal to 0. This is, again, an if statement because I want to check a condition and make a decision about what to do next based on the result of that. N mod i, I write N % i since that is the mod operator. I want to see if it's 0, so I use ==. Recall that two equal signs compare for equality. Then I have curly braces around what I want to do if this condition is true. If so, answer no is again return 0. We would know our answer immediately is no, so we would return 0 in this case. After all of this, if we finish counting, that is, after the body of the for loop, if we haven't returned and left this function, we answer yes, we put return 1. This code would work fine, but we're going to do just a little clean up. Generally, when we're programming, we don't like capital letters for variables. All capital letters is usually reserved for a constant, so we'll use lowercase n for this variable. Now we have it, a function that will compute whether or not n is prime.