could you Help me.. how to Add reverse the Answer (Add The Descending Sortation)?
if i Put 10 on "n" The Answer Is : 2,3,5,7
But I Want The Answer To Be : 7,5,3,2
And i dont know how.. please help :(
Idont Understand Even I read The Instruction... Please
My Current Program :
#include<iostream.h>
#include<conio.h>
void main() {
int n,c,x,y;
cout<<"Put a Number (we will Find The Prime 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<<" "; }