Answer:
PSEUDOCODE
BEGIN
A = 0
n = 1
Input Number
Loop :
do while n <= Number
A = A + (-1)^(n+1) * (1/n)
n = n + 1
return to loop
print A
END
See attachment for Flowchart
Explanation:
Assume number = 3
First Loop : A = 0 + (-1)^2 * 1/1 = 1
Second Loop : A = 1 and n = 2
A = 1 + (-1)^(2+1) * 1/2 = 1 - 1/2
Third Loop : A = 1 - 1/2 and n = 3
A = 1 - 1/2 (-1)^(3+1) * 1/3 = 1 - 1/2 + 1/3
Print A will then print 5/6