I'm trying to get my code to compile properly and it just won't. I know the code works when using a printf and scanf but now that I've changed it to get_int and printf it is not working properly. I believe the issue is in lines 12 ans 13, but why are my limits being ignored? How do I fix the problem so my code compiles as it should?
On line 8, you set h = 0. Inside the do-while loop, you don't do anything to h, because you're working with a different variable, height. Then you check if h is between 1 and 8, but it's still 0 because you never do anything to it. h just always stays with the value 0.
Try editing your code so it only uses one variable for the height of the pyramid.