0

Well, I don't know what's the matter with this code (Mario). When I run it, the terminal goes crazy, like a thousands enters are triggered, the "craziness" of the terminal don't stop, I have to quit the Gedit.

Any help is appreciated. This is the code:

I've included the stdio and cs50 libraries and the int main (void). For any reason they don't display properly in this post.

[code removed per academic honesty policy]

2
  • FYI - no need to quit gedit. If something like that happens again, hit ctrl-c, which should abort and bring you back to a prompt at the command line. – L.B. Aug 13 '15 at 2:27
  • Thank you, now it comes handy to me. – Paul_1898 Aug 13 '15 at 17:09
4

This line causes it: for (spaces = height - rows; spaces <= height; --spaces). While spaces is less than height, print a space and make spaces smaller. It is an infinite loop.

2
  • Thank you it solved the problem... – Paul_1898 Aug 13 '15 at 17:09
  • Then could you please accept my answer and upvote it by clicking the check mark beside my answer and click the up arrow beside my answer? – i_am_david Aug 13 '15 at 17:49

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .