How would I change this loop to print prime number in reverse... starting from the biggest one first
int main(){
bool prime;
for( int i=3; i<=10000; i++){
prime = true;
for(int n=2; n<=i-1; n++){
if( i%n == 0){
prime = false;
}
}
if(prime){
cout << i << " ";
}
}
return 0;
}