Question: #include stdio.h int main(void) { int num; double item; double sum = 0; puts(Enter the number of values to be added up: ); scanf(%d, &num);

#include stdio.h int main(void) { int num; double item; double sum = 0; puts(Enter the number of values to be added up: ); scanf(%d, &num); for (int i = 1; i = num; i++) { scanf(%lf, &item); sum += item; } printf(Sum of the %d items above is: %10.2f, num, sum); }

Step by Step Solution

3.38 Rating (145 Votes )

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 Mathematics Questions!