At Westonci.ca, we make it easy for you to get the answers you need from a community of knowledgeable individuals. Get immediate answers to your questions from a wide network of experienced professionals on our Q&A platform. Our platform offers a seamless experience for finding reliable answers from a network of knowledgeable professionals.

How do you accumulate a value in a loop? Assume these two variables have been declared before the loop.

double input =0.0; double sum =0.0;

a. sum += input;
b. sum=input;
c. input = input + sum;
d. sum = sum + input;