n=input("n = ")
L=0
clf
xselect()
function y=f(x)
y=sin(x)
endfunction
for k =1:n
    a=(k-1)*%pi/n
    b=k*%pi/n
    L=L+sqrt((sin(b)-sin(a))^2+(b-a)^2)
end
afficher(L)
x=linspace(0,%pi,100);
plot(x,f)
x=linspace(0,%pi,n+1)
plot(x,f,"r")