Sorry, the code I gave is only for the first, I thought you were after:
3 2 1
2 1
1
for the second. For
3
3 2
3 2 1
it is the exact same code as the example from your professor, except you are printing i+1-j, or alternatively change the second for loop in my example to for(int j=n; j>=i; j--)