saved boilerplate code

This commit is contained in:
2022-06-21 10:12:06 -05:00
parent c63edc7de7
commit e36c1b266b
+51
View File
@@ -0,0 +1,51 @@
#include <iostream>
#include <string>
using namespace std;
void sortNumbers(int sortArray[], int howManyToSort){
}
int main(){
int howManyToSort = 5;
int *sortArray = NULL;
int loopIndex = 0;
cout << " Enter how many numbers to sort: ";
cin >> howManyToSort;
cout << endl;
sortArray = new int[howManyToSort];
for (loopIndex = 0; loopIndex < howManyToSort; loopIndex++)
{
cout << " Enter number: ";
cin >> sortArray[loopIndex];
cout << endl;
}
sortNumbers(sortArray, howManyToSort);
}