Post in Forums
Create a Profile
Upload Pictures
Make Polls
Keep a Journal
Meet Friends
Have Fun
It's FREE!
Sign Up!
Avoid the cold & the crowds - Buy your Christmas gifts at Amazon.com
Forum Index > Computers & Internet > Programming
>> AP Comp. Sci. (Java Help!)
Reply to Topic
Search Topic
Subscription
Author Message
New Post! Sep 17, 2009 @ 21:15:39#1
matthewdb

Points Whore
808 points


Send PM


16/NA/Niether here nor there,
Join Date: Feb 2007

Hi! I'm taking AP Computer Science at my high school and I've got some confusion as to what the project prompt I've been given to work on tonight is asking and how to go at it. Here's the prompt:

"The German mathemetician Gottfried Leibniz developed the following method to approximate the value of pi:

pi/4 = 1 - 1/3 + 1/5 - 1/7 + ...

Write a program that allows the user to specify the number of iterations used in this approximation and displays the resulting value."

Any help would be appreciated, thank you

Remember, its gotta be in java.




Awkwardly speaking with nothing to say.
On September 18, 2009
New Post! Sep 17, 2009 @ 21:41:44#2
sugarflyguy
Aye-curumba


Ogler+
24912 points


Send PM


39/M/Somewhere in the UK, United Ki
Join Date: Sep 2008

Java is similar to C++




Now with better color management profile
1 Corinthians 13
Hello, farewell to your love and soul
Hello, farewell to your SOOOOOOUUUUULLLLLL!!!! - Peter Hook 1987 Brixton Academy
On November 21, 2009
New Post! Sep 18, 2009 @ 01:04:51#3
matthewdb

Points Whore
808 points


Send PM


16/NA/Niether here nor there,
Join Date: Feb 2007

Similar, but not the same. I had C++ in computer programming last year. The course was very superficial.




Awkwardly speaking with nothing to say.
On September 18, 2009
New Post! Sep 18, 2009 @ 01:10:54#4
Asme251
Area Man


Über-Minister+
15309 points


Send PM


109/NA/Kilbasa, Trinidad and Tobago
Join Date: Jan 2008

matthewdb said:

Hi! I'm taking AP Computer Science at my high school and I've got some confusion as to what the project prompt I've been given to work on tonight is asking and how to go at it. Here's the prompt:

"The German mathemetician Gottfried Leibniz developed the following method to approximate the value of pi:

pi/4 = 1 - 1/3 + 1/5 - 1/7 + ...

Write a program that allows the user to specify the number of iterations used in this approximation and displays the resulting value."

Any help would be appreciated, thank you

Remember, its gotta be in java.



Use a for loop? I don't really know much about imput and output in java. I've just started taking the course about 4 weeks ago, and I'm not getting it.



Barbaric!
On November 21, 2009
Reply to Topic<< Previous Topic | Next Topic >>

Top

TFS Time: Sat 21 Nov 2009 03:14 pm CST
Copyright © 2004-2009 Funky Llama Productions, LLC   |   Home   |   Contact   |   Privacy Policy   |   Terms of service

The Forum Site - Your premier source for everything LOGIN REGISTER