Here's your program.
printf("Enter the number of elements ");
printf("\nEnter the numbers...");
sum += num;
Show your code.
We will help you make it work right.
How would the list of integers be entered into your program? You really need to give us code/more information for us to be able to help you.