a=0;
b=Pi/2;
RiemannF[x_]=N[Sin[x]];
n=200
h=(b-a)/n;
For[k=1;A=0,k≤n,k++,A=A+RiemannF[a+k*h]]
A=N[h*A]

a=0;
b=Pi/2;
TrapF[x_]=N[Sin[x]];
n=200
h=(b-a)/n;
For[k=0;A=0,k≤n,k++,A=A+2*TrapF[N[a+k*h]];]
A=SetAccuracy[(h/2)*(A-TrapF[a]-TrapF[b]),20]

a=0;
b=Pi/2;
SimpsonF[x_]=N[Sin[x]];
n=200
h=(b-a)/n;
For[k=0;A=0,k≤n,k++,A=A+2*(1+Mod[k,2])*SimpsonF[a+k*h]]
A=SetAccuracy[(h/3)*(A-SimpsonF[a]-SimpsonF[b]),20]

Compute π

a=0;
b=1;
TrapF[x_]=N[1/(1+x^2)];
n=1000;
h=(b-a)/n;
For[k=0;A=0,k≤n,k++,A=A+2*TrapF[a+k*h]]
A=4*SetAccuracy[(h/2)*(A-TrapF[a]-TrapF[b]),20]