Given that s= n/2{ 2a + (n-1) d} is the formula for the sum of an AP, what is a flow chart and a BASIC program?

LET S = (N/2)*(2*A + (N-1)*D)

you don't need much of a program or flowchart to evaluate a simple expression...