> How To Add Descending Sortation C++?

How To Add Descending Sortation C++?

Posted at: 2014-12-18 
What do you mean by sorting? What exactly do you want to sort?

If you want to have a special sorting for your output numbers, you can use an array for them, then a loop to sort them in the way you want.

Otherwise you should make your question clearer.

You seem terribly confused about English and about what you're asking... Sorting can be found here: http://www.cplusplus.com/reference/algor...

#include

#include

void main() {

int n,c,x,y;

cout<<"Put a Number (we will Find The Prime Number On Your Number) : ";

cin>>n;

for(x = 1; x < n; x++)

{ c = 0;

for( y = 1; y <= x; y++)

{ if(x % y == 0)

c++; }

if(c==2)

{ cout<
getch();}

would you help me? to add descending and ascending sortation on this program?