The "correction" changes the meaning of the program (that is,
changes its design, not just fixes bugs). So even if it were
a correct "correction", it would be unhelpful unless you (Jason)
provide some reason *why* the change should be made.
Note that in your version, only the input '4' will stop the
program (intentionally). The prompt to the user doesn't
give any clue that this is the case. That's bad.
That isn't much better, consider the following two lines of input
line1: 1
line2: tom is so good
At the second line scelta == 1 so the do/while will break with the
program thinking that 1 was the users choice.
I had thought that arguments to scanf that couldn't be matched received
indeterminate values (and thus line 1 wasn't even necessary), but it
appears I was wrong. Could anyone provide chapter and verse on what
happens to 'scelta' during the second scanf call?
-Arthur