Needs["NumericalDifferentialEquationAnalysis`"]
n = 17;
xw = NewtonCotesWeights[n,-1,+1,QuadratureType->Open];
Do [ 
      Print["    x(",i,") = ",N[xw[[i]][[1]], 30] ],{i,1,n,1}];
Do [   
      Print["    w(",i,") = ",N[xw[[i]][[2]], 30] ],{i,1,n,1}];