HOW DO I STORE AND SORT THE NUMBERS INTO DESCENDING ORDER USING MY CODE?
I have them printing out in ascending order, now I do not know how to print them into descending order.
1) Prompts the user to enter two integer numbers Lower and Upper
2) Prompts the user to enter two more integers, p and q
3) Using a WHILE loop, display all numbers between Lower and Upper that are divisible by either p
4)Modify the program so that it also prints that same series out in descending order as well
5)There should be no repetitions. Numbers that are divisible by both p and q should only be
printed out once.
How do I store the numbers into and array and print them out in descending order?
int main() {
int lower, upper, lower2, lower3, p, q;
cout<< "Enter two numbers to be a Lower and Upper bounds: \n";
cin>> lower >> upper;
cout<< "Enter two numbers to be the p and q values: \n";
cin>> p >> q;
cout<< "Ascending order: \n";