Results 1 to 3 of 3
- 11-30-2012, 12:23 PM #1
Member
- Join Date
- Nov 2012
- Posts
- 1
- Rep Power
- 0
For loop not giving me the required answer.
Hi.There is this program i am writing to calculate e^x.If i use a for loop and initialize my Variable(t) to 1,after the For loop is executed in Instruction(t*=Fact(z)) it returns 1 at the end of the loop for t(Fact is my method for factorial).Why does this happen and how can i Change this .Thanks.
- 11-30-2012, 12:40 PM #2
Moderator
- Join Date
- Apr 2009
- Posts
- 10,484
- Rep Power
- 16
Re: For loop not giving me the required answer.
You might need to show your code.
And please wrap it in [code] tags [/code] otherwise it will lose all formatting and fewer people will bother trying to read it.Please do not ask for code as refusal often offends.
- 11-30-2012, 01:42 PM #3
- Join Date
- Sep 2008
- Location
- Voorschoten, the Netherlands
- Posts
- 11,605
- Blog Entries
- 7
- Rep Power
- 17
Similar Threads
-
This loop array stuff is giving me a headache
By EscSequenceAlpha in forum New To JavaReplies: 1Last Post: 05-08-2012, 09:45 PM -
while loop tries 20 times before giving up
By JMAsterson in forum New To JavaReplies: 3Last Post: 04-10-2012, 10:02 PM -
[SOLVED] controversy about the required answer
By vysh in forum Advanced JavaReplies: 5Last Post: 04-28-2009, 08:02 AM -
How to loop a question when answer is negatve?
By brazuca in forum New To JavaReplies: 6Last Post: 04-23-2009, 05:46 AM -
Repeat while answer yes - do while loop
By AJ2009 in forum New To JavaReplies: 1Last Post: 01-10-2009, 06:19 PM


LinkBack URL
About LinkBacks
Reply With Quote
Bookmarks