Algorithm
Step 1: Read 'n' and 'x'
Step 2: Let i = 0 and e = 0.0
Step 3: Repeat Step 3 to Step 5 for i <= n
Step 4: e = e + (x^i/i!)
Step 5: i = i + 1
Step 6: Print e^x :- 'e'
And the following algorithm illustrates the activities involved in computing a^b i.e., 'a to the power b':
START with parameter 'a' and 'b' (Both are of integer type)
Step 1: If b<0 then b=b*(-1) and flag=1 else flag=0
Step 2: Let i = 1 and p = 1.0
Step 3: Repeat Step 3 to Step 5 for i <= b
Step 4: p = p * a
Step 5: i = i +1
Step 6: If flag=0 then return 'p' else return '(1/p)'
STOP