try{
using(StreamWriter sw=new StreamWriter("Book1.csv"))
{
sw.WriteLine(string.Format("{0},{1},{2}","value of w","Pa","Pb"));
for (g = 0; g <= p2; g++)
{
sw.WriteLine(string.Format("{0},{1},{2}",g,Pa[g],Pb[g]));
}
sw.Flush();
}
}
catch(IOException){Console.Write("Coudnt open file\n");
}