I wanted to input some numbers with scanf function,
i can enter some numbers and if I input -1 to the scanf, the input must end. And the scanf function has limited input, the max that I can input is 40 numbers.
example if enter 1 2 4 6 5 4 -1
the scanf function will ended and the result will be appear.
I wanted to know
how the scanf function is like that would be best for this problem,the result if I input those number will be likeCode:scanf("%d", &n);
|
||
||||
||||||
|||||
||||
I am very beginning on c , please anyone can help me??