First you need to learn how to use the loops and ifs. Instead of solving the problem try something like user inputs a number as checks if its greater than 10 or less than 10. and then try to get the numbers till user enters 0 to see if its greater than 10 or not.

Code:
for(int i=2;i<n/2;i++)
{
    if(n%i==0)
}
This as far as I know looks like C but is not C