package ch6;
public class ch6_28_2
{
public static void main(String awgs[])
{
double dx=0.00001,x=0,a=0,b=0,c;
do
{
a = a+(Math.sin(x))*dx;
x=x+dx;
b=Math.sin(x);
System.out.println(Math.sin(x));
}while(b>=0);
System.out.print(a);
}
}
=====================
前略
1.9999999999844151
文章標籤
全站熱搜
留言列表