Well, let me explain by taking your code example.
In your code you have written this line.
int x = total(0,1,2,3,4,5,6,7,9,10,11,12,0);
here y0u have given the numbers which you liked.
My question is: Instead of you giving the numbers is there any way to accept those numbers at runtime from the user and pass the same to tal function.
Well this is the output I am expecting on running:
Enter the numbers you want to add separated by comma:
The Total is 10