3
So here’s the deal:
How to receive C entries (integers) until "ENTER" is pressed?
In my program, the user must enter a chained list in the following format:
num0 num1 num2 num3 num4 num5 num6 num7 .. numN.
Ex. of list:
19 8 9 14 15 9 -9 0 7 6 5 4 -123 1.
The size of the list is unknown. It can be as many integers as the user wants to type.
How to stop the input after last number is typed?
What I need is that after enter is pressed, the program stops reading inputs.
Ex. User type: 4 5 6 7 8 9 10 and now [ENTER]. How to read the list since I use no conditions to stop the entry?
The program must accept negative, non-negative and zero integers.
I didn’t say, but I will have to use negative numbers as well. Anyway, thanks for the help.
– IPSonic
@L.Pedro lack other details to give a more appropriate answer, to tell the truth maybe this question should be closed as unclear, even saying this, it is still complicated to give an answer that meets exactly what you want, without having to guess.
– Maniero
I updated the question, take a look.
– IPSonic
The problem is that there are already 3 answers to the original, so it is too late, if no answer was useful then I think the question should be closed because it is not clear and create a new one. Anyway you need to do better than that, you are still confused and as it indicates to be a much more complicated problem you need to post in the new question what you have already done and what problem you are facing to have a specific question. The current form the question does not work here since you are asking to do everything for you and it is not something so trivial.
– Maniero