Question: I can't get this to sum the numbers I enter. #include int main() { int sum = 0; int numItems = 0; int intArray[10]; int

I can't get this to sum the numbers I enter. #include int main() { int sum = 0; int numItems = 0; int intArray[10]; int average = 0; do { printf("%s", "Please enter the number of integers you want to sum less than or equal to 10"); scanf_s("%d", &numItems); } while (numItems > 10); for (int i = 0; i < numItems; i++) { printf("%s", "Please enter the number:"); scanf_s("%d", &intArray[i]); sum = sum + intArray[i]; } average = sum/numItems; printf("The average is %d , average"); return 0; }

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!