Sum of iterated values

# Thread: Sum of iterated values

1. Junior Member
Join Date
Dec 1969
Posts
4

## Sum of iterated values

How can I get the SUM of the value "f"? If I use f = f + f then I get the current amount + the current amount instead of the SUM of each "f". The results for each iteration for "f" is;<BR><BR>11400<BR>11799<BR>12211.965<BR>12639.38 3775<BR>13081.762207125<BR><BR>Which means the result should be smoething like<BR><BR>61,132.11<BR><BR>How can I get this number?<BR><BR><BR><BR><BR> a = 950<BR> b = 12<BR> c = .035<BR> y = 1<BR> <BR> for p = 1 to 5<BR> f = b * a <BR> g = c * f <BR> h = (f * 1) + (g * 1) <BR> k = g / b <BR> a = (k * 1) + (a * 1)<BR> response.write f & "<BR>" <BR> next<BR><BR><BR><BR><BR>Thank you very much!<BR><BR>

2. Senior Member
Join Date
Dec 1969
Posts
449

## RE: Sum of iterated values

a = 950 <BR> b = 12 <BR> c = .035 <BR> y = 1 <BR> <BR> for p = 1 to 5 <BR> f = b * a <BR> g = c * f <BR> h = (f * 1) + (g * 1) <BR> k = g / b <BR> a = (k * 1) + (a * 1)<BR> z = z + f <BR> response.write f & "&lt;br&gt;" <BR> next <BR> response.write "z = " & z & "&lt;br&gt;"

3. Junior Member
Join Date
Dec 1969
Posts
4

## RE: Sum of iterated values

Thank you very much.

#### Posting Permissions

• You may not post new threads
• You may not post replies
• You may not post attachments
• You may not edit your posts
•