enter image description here

@MARS The negative number was solved with the help of "MARS" and "curiouskiwi" accounts, however now I got 2 prompts problems, one without the minutes, and one with the minutes, which result in 3 lines of result on the terminal, instead of two.

How to solve this?

TIA again.

1 Answer 1


Remove the = get_int() in line 7.

Take the = (minutes * 12) from line 8, and move it as bottles = minutes * 12; (then without the int as you already declared it) somewhere below the remaining = get_int(), either in or below the do..while loop, but before the final printf.

  • Huge help with the extra 'int' declaration. Solved my problem. Oct 25, 2017 at 18:02

You must log in to answer this question.

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