Would You Add Descending Sortation This Program?

Would You Add Descending And Ascending Sortation To This Program? Im Really Confused :(

#include<iostream.h>
#include<conio.h>
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<<x<<" "; }}
getch();}
Last edited on
Topic archived. No new replies allowed.