Hi!
I am working on an assignment to print a set of odd and even number up to the given input number but I am having trouble with the last part. I want the odd numbers to print in descending order but I am not sure how to do that.
Here's what I have so far
#include <iostream>
using namespace std;
int main()
{
// Get number from user
int input = 0;
cout << "Enter a number:\n";
cin >> input;
// Print numbers from [1..input]
for (int num = 1; num <= input; num++)
cout << num << " ";
cout << endl;
// Print EVEN numbers from [0..input-1] (FIX)
for (int num = 0; num <= input-1; num+=2)
cout << num << " ";
cout << endl;
// Print ODD numbers from [input..1] (FIX)
for (int num = 1; num <= input-1; num+=2)
cout << num << " ";