Question: write a C app that does the following Last time, you were given a series like the following and you needed to calculate the value
write a C app that does the following

Last time, you were given a series like the following and you needed to calculate the value of S(x) by using a simple for loop in C. S(x) = = x + (x+1) + (x+2) + (x+3) + (x+4) + + (x + n-1) + (x + n) + to write a program that prompts user to enter two values, x and n. Then it would use a function to compute the sum of the series. It will take two arguments, x and n. It will return the sum of the series. As an example, for input values x = 100 and n = 0, it should output 100. For x = 100 and n = 1, it should output 100 + 101 = 201. Error check: If n is negative, display an error message
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
