Here's what the code should look like (no error checking, which you should add):
int numberM =0, numberN=0, i=0;
printf("Enter m: ");
printf("Enter n: ");
for(i = (numberM +1); i<numberN; i++)
Things you should know that were replaced and why:
namespace objects and functions are C++, they were replaced with appropriate printf/scanf calls.
2) In C, all variable declarations must occur at the beginning of the function, not the case with C++.
What's lacking in this code:
1) Checking for errors
is NOT type safe, meaning the result of a user putting in the wrong input type is undefined