Ask Question

Name:
Title:
Your Question:

Answer Question

Name:
Your Answer:
User Submitted Source Code!


Description:
  1
Language: JAVA
Code:
public class Shirin Dehghani {

    public static void main(String[] args) {
        double[] x = new double[100];
        x[0] = 0.5;
        int i=0;
        final double L = 0.0001;
                while(true) {
            if ( i>0 && Math.abs9x[i]-x[i-1])  < L) {
                System.out.printf("The answer a = %.4f 
                 , x[i]);
                break;
            }
            i++;
            x[i] = x[i-1] - ((x[i-1] - Math.cos9x[i- 
             1])) / (1 + Math.sin(x[i-1])));
         }
    }

}          
Comments: