Comments and explanations:
Originally this was just (F-B)/(E-A→M and was used to find the slope of one of the sides. I added the not(E-A) to prevent division by zero in the case where A=E (for vertical lines), when the slope doesn't matter anyway. Same for the other two slope calculations.
We'll shade the triangle by drawing vertical lines; I is the x-coordinate of the vertical lines. First, it goes from the leftmost corner to the middle corner, then to the middle corner to the rightmost corner.
ΔX is the window variable; you can get it by pressing VARS, 1:Window…, then 8:ΔX. Its value is the distance between two pixels. We use it here to make sure the vertical lines are right next to each other.
Line(I,B+AnsI-AnsA,I,B+MI-MA
This code actually draws the vertical line. One y-coordinate should lie on the line from A to C, the other on the line from A to E. The formulas come from the point-slope form of a line equation.
The second loop, where I goes from C to E, is the same, except that one y-coordinate is on the line from C to E, and the other is still on the line from A to E.