anonymous
  • anonymous
please , help me .. how can i solve this attachment by Java program?
Computer Science
schrodinger
  • schrodinger
I got my questions answered at brainly.com in under 10 minutes. Go to brainly.com now for free help!
At vero eos et accusamus et iusto odio dignissimos ducimus qui blanditiis praesentium voluptatum deleniti atque corrupti quos dolores et quas molestias excepturi sint occaecati cupiditate non provident, similique sunt in culpa qui officia deserunt mollitia animi, id est laborum et dolorum fuga. Et harum quidem rerum facilis est et expedita distinctio. Nam libero tempore, cum soluta nobis est eligendi optio cumque nihil impedit quo minus id quod maxime placeat facere possimus, omnis voluptas assumenda est, omnis dolor repellendus. Itaque earum rerum hic tenetur a sapiente delectus, ut aut reiciendis voluptatibus maiores alias consequatur aut perferendis doloribus asperiores repellat.

Get this expert

answer on brainly

SEE EXPERT ANSWER

Get your free account and access expert answers to this
and thousands of other questions

anonymous
  • anonymous
1 Attachment
anonymous
  • anonymous
anonymous
  • anonymous
class PiEst{ public static void main(String args[]){ float calc = m(201); System.out.println( calc + "\n"); } public static float m (int i){ float addPI = 0; for (int j = 1; j<=i; j++){ addPI +=(Math.pow((-1),(j+1))) /((2*j) -1); } return 4*addPI; } }

Looking for something else?

Not the answer you are looking for? Search for more explanations.

More answers

anonymous
  • anonymous
table class PiEst{ public static void main(String args[]){ float calc =0; for(int i = 0; i<10; i++){ calc = m(i); System.out.println( i+"\t\t"+calc + "\n"); } } public static float m (int i){ float addPI = 0; for (int j = 1; j<=i; j++){ addPI +=(Math.pow((-1),(j+1))) /((2*j) -1); } return 4*addPI; } }
anonymous
  • anonymous
this will be calculate the PI of numbers less than 10 .. and we need it calculate the PI for ( 1,101,201,301,401,501,601) , i have not find the equation which do it
anonymous
  • anonymous
anonymous
  • anonymous
make a few modification to the code. change the number. instead of incrementing the loop by 1, you can have the loop increment by 100. like this for(int i = 1; i<=601; i+=100){ //do some stuff }

Looking for something else?

Not the answer you are looking for? Search for more explanations.