i have this code which input 3 numbers into ascending order. i know make it 10 i just change the array size but then it is only ascending the numbers that were inputing that are under 10. how can i change it so it's any number.
#include <iostream>
#include <conio.h>
using namespace std;
int main ()
{ int x;
int array [3], t;
for (x=0; x<3; x++)
{
cout << "Enter integer number: " << endl;
cin >> array[x];
}
for (x=0; x<3; x++)
{
for (int y=0; y<2; y++)
{
if(array[y]>array[y+1])
{
t=array[y];
array[y]=array[y+1];
array[y+1]=t;
}
}
}
cout << "The integers in ascending order are : ";
for (x=0;x<3;x++)
{
cout <<"\n";
cout <<array[x];
cout << "\n";
}
system ("pause");
return 0;
}