I have completed my pset1 . It works fine on codeblock but on gedit i am facing this problem for several times.
I don't know why it works in Codeblock, but the correct condition would be:
i <= x && j >= 0
i <= x, j >= 0
as you have.
for loop should be:
for (i = 0, j = x; i <= x && j >= 0; i++, j--
If this answers your question please accept it by clicking the gray check-mark to the left, so that it becomes green. You can also vote it up by pressing the up arrow above the check-mark. And don't forget to keep coding!