Mason,
As you probably know, basic for loop is similar to C++
for(loop variable beginning value; loop continue condition; change in the value per iteration)
You can therefore apply your problem into these places where the change will be 1. This will loop you through all the values- from starting till the end.
Inside the for loop, you can use continue statement to exit the current iteration of the loop and move over to next.
Hint: Try using the % operator to check if the variable is a multiple of a number or not
So, conceptually, your loop will be something like:
for(... ; ... ; ...)
{
if( condition to check if the variable is a multiple)
{
continue;
}
// perform rest of your work here
}