Umm my code doesn't work properly and I don't seem to find the solution for my problem. Code doesn't print the right numbers. Can anybody help? Thank you!
#include <iostream>
#include <conio.h>
using namespace std;
main(){
int number[] = {3, 5, 8, 1, 9, 2, 6, 4, 7, 10};
int temp;
for(int i2=0; i2<10; i2++)
{
for(int j=0; j<10; j++)
{
if(number[j]>number[j+1])
{
temp=number[j];
number[j]=number[j+1];
number[j+1]=temp;
}
}
}
for(int x =0; x<10; x++){
cout<<number[x];
}
}