It would be so much easier if you wouldn't post a screenshot but just the code as text. Then, somebody else could copy and possibly fix it.
I guess the error is that you multiply with t instead of divide by t in the equation where you actually calculate the approximation of pi.
Btw, you use the Matlab function pi as perfect value. I'm sure this value won't be too bad but usually in such iterative approximations, the error is defined as difference between two iterations (please correct me if I'm wrong).