I'm still not sure I get the concept of a "perfect" number. What exactly are you trying to do here?
Edit: Oh! I think I see now . . .
Start by indenting your code properly. And move the return 0 out of the for loop.
#define MAX_N 7.0
for (n=0; n<MAX_N; n += 1)
number = pow(2.0,n-1.0)* (pow(2.0,n)-1.0);
if ((number > 1) && (number < 10000))
printf("The perfect number is %d.\n", number);
Here is my output I am getting:
System ErrorSystem ErrorThe perfect number is 6.
The perfect number is 28.
The perfect number is 120.
The perfect number is 496.
The perfect number is 2016.