Help me ! c++ partner

Hi everyone ! i have this problem but i can not solve it. write C++ for bubble sort. 1) ask user to enter 10 random numbers, generate array and sorted.
2) selection sort.
thank all you guy

this is my answer that it has many mistakes.#include <iostream>
using namespace std;

int main()
{
const int arraySize = 10;
int randNum, i, j;
int num;
int temp = 0;

cout << "Enter 10 numbers you want:" <<endl;
cin >> randNum;

temp = 0;
for (j = 1; j<arraySize; j++)
{
num = randNum % arraySize;
arraySize [i] = randNum;
}
for (i = 0; i < arraySize ; i++)
{
for (j = 0; j< arraySize; j++)
{
if (randNum[index]>randNum[index + 1])
{
temp = randNum[index]
randNum[index] = randNum[index +1]
randNum[index +1]=temp;
}
}
return 0;
}
Topic archived. No new replies allowed.