Any Java Experts? More Help! - Fantasy Baseball Cafe 2014 Fantasy Baseball Cafe
100% Deposit Bonus for Cafe Members!

Return to General Talk

Any Java Experts? More Help!

Moderator: Baseball Moderators

Re: Any Java Experts? More Help!

Postby Tavish » Thu Jan 28, 2010 12:28 am

You are skipping the first even term in your loop. Your first evaluation is 3+2.
Image

Bury me a Royal.
Tavish
Mod in Retirement
Mod in Retirement

User avatar
CafeholicFantasy ExpertCafe WriterCafe RankerMock(ing) DrafterEagle EyeCafe SpotterWeb Supporter
Posts: 11066
(Past Year: 70)
Joined: 3 May 2004
Home Cafe: Baseball

Re: Any Java Experts? More Help!

Postby sox 06 » Thu Jan 28, 2010 12:05 pm

Tavish wrote:You are skipping the first even term in your loop. Your first evaluation is 3+2.

Ah there you go! I feel like an idiot sometimes with this Java stuff !+) But I'm getting better :-D

Alright, another question. I've gone on Google to look for this, but I've been a bit confused about what I've read. How do you add a string of numbers together? I have the code written for 2 raised to the 1000th power, but now I need to add each digit in that answer and print out the sum. Do I need to use something like a toString in the BigInteger class? Here is what I have so far:

Image
sox 06
General Manager
General Manager

User avatar
CafeholicEagle Eye
Posts: 4425
(Past Year: 4)
Joined: 22 Apr 2006
Home Cafe: Baseball

Previous

Return to General Talk

Who is online

Users browsing this forum: unioreimi and 5 guests

Forums Articles & Tips Sleepers Rankings Leagues


Today's Games
Friday, Apr. 18
(All times are EST, weather icons show forecast for game time)

Toronto at Cleveland
(2:20 pm)
LA Angels at Detroit
(7:05 pm)
Milwaukee at Pittsburgh
(7:05 pm)
St. Louis at Washington
(7:05 pm)
Miami at Miami
(7:08 pm)
indoors
NY Yankees at Tampa Bay
(7:10 pm)
indoors
Seattle at Seattle
(7:10 pm)
Atlanta at NY Mets
(7:10 pm)
Baltimore at Boston
(7:10 pm)
Chi White Sox at Texas
(8:05 pm)
Minnesota at Kansas City
(8:10 pm)
Philadelphia at Colorado
(8:40 pm)
Houston at Oakland
(10:05 pm)
Arizona at LA Dodgers
(10:10 pm)
San Francisco at San Diego
(10:10 pm)

  • Fantasy Baseball
  • Article Submissions
  • Privacy Statement
  • Site Survey 
  • Contact