Algorithms & FLowcharts
Thursday, October 10, 2013
ALGORITHM TO FIND SUM OF THE SERIES 2+5+8+11...UPTO N TERMS
STEP 1.
I <-- 0, J=2, Sum <-- 0, N <-- 0
STEP 2.
Read N
STEP 3.
While (I <= N-1)
Begin
Sum
<-- Sum+ J
J <-- J + 3
I <-- I + 1
End
STEP 4.
Print Sum
No comments:
Post a Comment
Newer Post
Older Post
Home
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment