begin

vrPICuartos=0
i=0
while((vrPICuartos*4-3.1416).abs>0.0001) do
          
vrPICuartos = (1.0/(2.0*i-1.0)*signo).to_f
signo=-signo.to_i
i=i+1.to_i
end
        
resultado=(vrPICuartos*4).to_f

       puts "El mas aproximado es, +resultado"
end