计算正弦曲线y=sin x 在[0,π]上与x轴所围成的平面图形的面积。其实现代码为:double x, y;double a=0, b=【1】, area=0, n=10000, w, r=0;w = (b - a) / n;x = a + w / 2;for (long i = 0; i < n; i++){ y = 【2】(x); r = y * w; area += r; x += w;}Console.WriteLine("The result is {0}", area);【1】和【2】处的内容分别是: