image of the code

when i make the code and i type ./population, the question asked is start size:, and when i type in an x value that is 9 or more, the question keeps reprompting and I keep looking through and I don't know what has gone wrong, it never moves on to ask me the y value. Please help

1 Answer 1


That program will end if a value greater than 8 is entered for x. The return x; returns from the main function, which is to say program ends. Ditto the return y;. return is the statement that ends a function. The do-while loops are not functions.

You must log in to answer this question.

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