This repository has been archived on 2026-10-10. You can view files and clone it. You cannot open issues or pull requests or push a commit.
Files
initial_cpp_program/initial_program.cpp
T
2022-06-21 10:12:06 -05:00

51 lines
722 B
C++

#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);
}