finding the divisors of an integer

hi,im studeing c++ know so;
i have this question:



i want to out put the positive divisors of the integer in decreasing order.

I think that i should use 2 loops firstsheak the number will be
bigger than 0.the scend is to sheak the modulas (x%2==0) then y=x%2.

thanks alot>.<
Do not double post. And yes you can use two for loops for this.
yes thank you;

put i could't writ it in the program i was confused!
and how can i output the y in adecresing order
e.x :
 
 cout<<"the divisors of the integer "<<y <<"are:"<<endl;

and the output will be:
the divisors of the integer 8 are:
4 2 1
like that.
ya ,thanks any way.
Topic archived. No new replies allowed.