Sort three numbers using only if-statements
I will try to take several things into account but to keep things simple. A few remarks:


First, it seems that you have a typo here:

if ((num1 &lt; num2) &amp;&amp; (num3 &lt;&lt; num1))


I think that you meant num3 &lt; num1 instead of num3 &lt;&lt; num1 in your second condition.
As @Josay says, you better write small functions. I would add that you better separate the input/output operations (that you can keep in main) and the sorting function. In my opinion, this would be a good enough signature for the sorting function:

void sort3(int&amp; a, int&amp; b, int&amp; c);


You would give three variables to it and it would sort them in-place so that you end up with \$ a \le b \le c \$.
Now, let's choose an algorithm. For three values, the easiest is to implement a bubble sort which shouldn't be really slower than other algorithms (when you want to sort more values, it becomes horribly slower though).

void sort3(int&amp; a, int&amp; b, int&amp; c)
{
    if (a &gt; b)
    {
        std::swap(a, b);
    }
    if (b &gt; c)
    {
        std::swap(b, c);
    }
    if (a &gt; b)
    {
        std::swap(a, b);
    }
}


Most sorting algorithms heavily rely on swapping values. The one I just implemented sorts your values with only three comparisons and at most three swaps and is, in my opinion, far simpler to understand than what you had.

Note that there are more efficient algorithms but I deliberately chose to present one that is not that bad while easy to understand.
This is not a problem in your case, but we can't stress out enough that using namespace std; is often considered bad practice. It is the case when used in a header file, especially in a library header file since it will pollute the global namespace of every file including it. That's not a problem for you since you're probably doing everything in a .cpp file but it's better to keep that in mind.
You don't need to return 0; at the end of main. If the compiler reaches the end of the main function without having encountered a return statement, it automagically adds a return 0; for you. Note that it only works with main though. Dropping this line is an interesting way to document that your program cannot return error codes and that it will only ever return 0.