Okay I have an array but how do I make it descending? I have it able to print out 1, 2, 3
but would rather have it do
1
2
3.
code below
#include <iostream> //Initalize Iostream
using namespace std;
void printarray(int arg[], int length) { //Print array function
for (int n = 0; n<length; ++n) // array conditons with n at default 0
cout << arg[n] << ' '; //output
cout << '\n';
}
int main()
{
int array[] = { 1, 2, 3 }; // array initalized
printarray(array, 3); // how many numbers to print in the array
}