Talk About Network

Google


Register and Login
Nick
Password
Register create new account Sign up is FREE and you can post replies, new topics, bookmark posts and more!
Recover lost password


Programming > Java Help > Calculating PI ...
Latest [ Topics | Posts ] Archive Post A New Topic Post a Reply
<< Topic < Post Post 1 of 20 Topic 15939 of 16566
Post > Topic >>

Calculating PI with the law of Cosines (Wont Work)

by Chase Preuninger <chasepreuninger@[EMAIL PROTECTED] > Apr 3, 2008 at 06:46 PM

package picomputer;

im****t static java.lang.Math.*;
im****t java.util.*;


public class Main
{
    public static void main(String[] args)
    {
        Scanner in = new Scanner(System.in);


        System.out.print("Enter angel A: ");
        double A = in.nextDouble();
        System.out.print("Enter circle radius: ");
        double radius = in.nextDouble();


        double a = pow(radius, A) * 2;
        a -= (2 * radius * radius) * cos(a);
        a = sqrt(a);


        double circ = a * (360 / A);


        System.out.println(circ * (radius / 2));
    }
 




 20 Posts in Topic:
Calculating PI with the law of Cosines (Wont Work)
Chase Preuninger <chas  2008-04-03 18:46:28 
Re: Calculating PI with the law of Cosines (Wont Work)
Lew <lew@[EMAIL PROTEC  2008-04-03 22:34:54 
Re: Calculating PI with the law of Cosines (Wont Work)
Patricia Shanahan <pat  2008-04-03 19:39:30 
Re: Calculating PI with the law of Cosines (Wont Work)
Lew <lew@[EMAIL PROTEC  2008-04-03 22:48:20 
Re: Calculating PI with the law of Cosines (Wont Work)
"Joe Blow" <  2008-04-03 23:10:44 
Re: Calculating PI with the law of Cosines (Wont Work)
Roedy Green <see_websi  2008-04-04 06:16:09 
Re: Calculating PI with the law of Cosines (Wont Work)
Roedy Green <see_websi  2008-04-04 03:05:40 
Re: Calculating PI with the law of Cosines (Wont Work)
Roedy Green <see_websi  2008-04-04 03:07:17 
Re: Calculating PI with the law of Cosines (Wont Work)
Roedy Green <see_websi  2008-04-04 03:09:04 
Re: Calculating PI with the law of Cosines (Wont Work)
Roedy Green <see_websi  2008-04-04 03:09:59 
Re: Calculating PI with the law of Cosines (Wont Work)
RedGrittyBrick <RedGri  2008-04-04 11:07:00 
Re: Calculating PI with the law of Cosines (Wont Work)
Chase Preuninger <chas  2008-04-04 03:44:59 
Re: Calculating PI with the law of Cosines (Wont Work)
Andrea Francia <andrea  2008-04-04 13:10:12 
Re: Calculating PI with the law of Cosines (Wont Work)
Lew <lew@[EMAIL PROTEC  2008-04-04 07:50:25 
Re: Calculating PI with the law of Cosines (Wont Work)
Patricia Shanahan <pat  2008-04-04 06:01:45 
Re: Calculating PI with the law of Cosines (Wont Work)
Roedy Green <see_websi  2008-04-04 16:01:55 
Re: Calculating PI with the law of Cosines (Wont Work)
JWS <JWS@[EMAIL PROTEC  2008-04-04 17:23:49 
Re: Calculating PI with the law of Cosines (Wont Work)
Lew <lew@[EMAIL PROTEC  2008-04-04 19:46:57 
Re: Calculating PI with the law of Cosines (Wont Work)
"John B. Matthews&qu  2008-04-05 12:43:59 
Re: Calculating PI with the law of Cosines (Wont Work)
Roedy Green <see_websi  2008-04-04 16:00:06 

Post A Reply:
  Go here to Signup

AddThis Feed Button


About - Advertising - Contact - Frequently Asked Questions - Privacy Policy - Terms of Use - Signup

Contact
tan12V112 Sat Nov 22 15:37:41 CST 2008.