I've fixed your code.
The main problem is that in your 2nd loop you should not stop your iteration at num - 1, but num instead.
There's another problem: you can only support 10 numbers. What if the user enters more numbers?
You should initialize your array to the desired size after you know how many elements you have. This, however, does not work in MS Windows. But since you're using C++, you could utilize the std::vector<T> type here.
I've also noticed that you check if j >= 0 after you've already read the element of arr[j]. You potentially read outside from the array. It's better to check first and read later. ;)
I've also formatted your code, your input and output as well.
#include <iostream>
using namespace std;
int main()
{
cout << "Enter the number of elements: ";
int num;
cin >> num;
int arr[num]; // Setting the size properly. Does not work in Windows. Use std::vector<int> instead?!
cout << "Enter the elements, one per line." << endl;
for (int i = 0; i < num; i++)
{
cin >> arr[i];
}
for (int i = 0; i < num; i++) // num - 1 is not enough, we want to end at num
{
int temp = arr[i];
int j = i - 1;
while (j >= 0 && temp < arr[j]) // Check for valid index first before reading the array from a potential invalid index
{
arr[j + 1] = arr[j];
j--;
}
arr[j + 1] = temp;
}
cout << "Sorted elements:";
for (int i = 0; i < num; i++)
{
cout << " " << arr[i];
}
cout << endl;
return 0;
}