It's not at all clear what the algorithm is supposed to be for generating the diagram.
You say the diagram is for a size of 5, but what you have drawn has lines of 8,6,5,6,8 characters. How do those values relates to a size of 5?
Before you can design the loops you need, you need to understand the the algorithm.
And since you haven't described the algorithm to us, we can't make any suggestions.
i-j nested loop: for each element just decide whether to draw a blank or an asterisk.
Suppose that you count down the page i (1 <= i <= size)
and inside that you count across the page j (1 <= j <= size). This is the nested loop.
The two diagonals are j = i and j = size+1-i. On each line (i), if the distance across the page (j) is less-than-or-equal-to the min() or greater-than-or-equal-to the max() of those diagonals then output an asterisk; otherwise output a blank. Make sure that you end a line after the inner loop.