Hey you programming nerds

Open to all topics
Erico
Junior Member
Posts: 1183
Joined: Sat May 30, 2009 10:49 am

Post by Erico »

Dartagn wrote:I have no clue what is going on in this thread. I assume you are making fun of me somehow.

Fuck off.
I made a program to make fun of you, it's easier on all of us :)
WORLD OF LOGS #1's

Force choking the shit out of bitches!
User avatar
Moonde
Junior Member
Posts: 364
Joined: Mon Jan 02, 2006 6:36 pm

Post by Moonde »

ericu wrote:That doesn't add onto the previous years, im usually good at this but im juggling three projects right now and just cant wrap my head around the mathematical equation.

the interest for the next year has to account for the interest that was already added on from the previous year, for instance.

100$ to start, with 10% interest would come out to 110$ after the first year, i then need it to continue to add interest onto that for however many years the user puts in. so the second year should be 110$ * 10% = 111$ and so on and so on.

I just can't think of how to actually write that as a formula
Sorry ericu, from the your op I thought you had the loop down and you just needed the formula. For loop would have worked nice as well.
godpigeon
Junior Member
Posts: 954
Joined: Mon Feb 04, 2008 9:57 pm

Post by godpigeon »

Though depending on language, there's a difference in for vs while loops... is the logic going to be used at least once or not ;P
And gone.
User avatar
Moonde
Junior Member
Posts: 364
Joined: Mon Jan 02, 2006 6:36 pm

Post by Moonde »

godpigeon wrote:Though depending on language, there's a difference in for vs while loops... is the logic going to be used at least once or not ;P
It just depends on the condition. If you know how many times you need to loop then for loop it. If the condition is something like "Moonde is now cool and attractive" and we don't know how many iterations of the loop it's going to take to make this condition true then a while loop works. Of course this condition will never end up being true and we'll end up with an infinite loop but that's beside the point!
godpigeon
Junior Member
Posts: 954
Joined: Mon Feb 04, 2008 9:57 pm

Post by godpigeon »

Actually if it was always untrue it'd skip that piece of logic. ;P
And gone.
Post Reply