Algorithm for C++

Your program must allow the user to input values for n, a, x and c. Your program will then perform the calculation, output the result and ask the user if they would like to perform another calculation.If they say yes,you will allow the user to input new values for n, a, x and c then perform the new calculation. Repeat this process until the user indicates that they are done with your program

sigma(ax+c)^2 i= 1

Could really use a example of what i need to do and what i need to put in the program to run it
closed account (48T7M4Gy)
See http://www.cplusplus.com/forum/beginner/146021/
any help for the code I will need
What code do you have so far? What part are you stuck on?
im not sure how to start it i known it uses for but not sure how in put it using the equation
Step 1: Start
Step 2: Declare variables a, b, c, D, x1, x2, rp and ip;
Step 3: Calculate discriminant
D←b2-4ac
Step 4: If D≥0
r1←(-b+√D)/2a
r2←(-b-√D)/2a
Display r1 and r2 as roots.
Else
Calculate real part and imaginary part
rp←b/2a
ip←√(-D)/2a
Display rp+j(ip) and rp-j(ip) as roots
Step 5: Stop

This is from a previous project is that right at all ??
Topic archived. No new replies allowed.