If I want to get input 3 numbers, I can write code like this:
scanf("%d %d %d", &a, &b, &c);
but how can I dynamically get the number of inputs from one line?
For example, if user enters N(number), then I have to get N integer number inputs from one line like above.
The input and output should be :
how many do you want to enter: 5
1 2 3 4 5
sum: 15