// d01bc Example Program Text // C# version, NAG Copyright 2008 using System; using NagLibrary; using System.Globalization; namespace NagDotNetExamples { public class D01BCE { static void Main(String[] args) { StartExample(); } public static void StartExample() { try { const int n = 7; double a, b, c, d; int itype; double[] abscis = new double[n]; double[] weight = new double[n]; int ifail; Console.WriteLine("d01bc Example Program Results"); a = 0.00e0; b = 1.00e0; c = 0.00e0; d = 0.00e0; itype = -3; // D01.d01bc(itype, a, b, c, d, n, weight, abscis, out ifail); // if (ifail == 0) { Console.WriteLine(""); Console.WriteLine(" {0}{1,3}{2}", "Laguerre formula,", n, " points"); Console.WriteLine(""); Console.WriteLine(" {0}", " Abscissae Weights"); Console.WriteLine(""); for (int j = 1; j <= n; j++) { Console.Write("\t{0,10:e5}\t\t{1,10:e5}", abscis[j - 1], weight[j - 1]); Console.WriteLine(""); } } else { Console.WriteLine(""); Console.WriteLine("** d01bc failed with ifail = {0,5}", ifail); } // } catch (Exception e) { Console.WriteLine(e.Message); Console.WriteLine("Exception Raised"); } ; } } }