Define the x points a xi = a + (b-a)i/n from i = 0 to n (This is general - you are given values of a, b, and n)
The LH Riemann sum is the area of the rectangles of width (b-a)/n and height equal to LH height (or f(xLH)
LH RS = sum from 1 to n of f(xi-1) (b-a)/n
RH RS = sum from 1 to n of f(xi) (b-a)/n