Code:
#include <iostream>
using namespace std;
int main ()
{
cout<<"Type in values\n";
int array[10];
for (int x=0; x<10; x++)
{
cin>>array[x];
}
//the problem seems to be here.
for (int y=0; y<10; y++)
{
if (array[y+1]<array[y])
{
int temp;
temp=array[y+1];
array[y+1]=array[y];
array[y]=temp;
}
}
for (int print=0; print<10; print++)
{
cout<<array[print];
cout<<endl;
}
return 0;
}