Re: Various Interest Rates
- From: "Rajah" <rajah.chacko@xxxxxxxxx>
- Date: 31 Jan 2006 14:14:35 -0800
Shannon, it's not so much the precision, but rather the declaration
that you have for rate.
Since you declared it as (int rate = 5; rate <= 10; rate++) rate can
only be an integer.
Without giving you the answer, could you think of another way to
declare rate so that it might hold fractional parts?
By the way, the "rate <= 10" will end the loop with rate = 11. I don't
know if you want to write this as "rate < 10" instead.
shannon wrote:
> The for loop below seems to be working for me, at the moment. I have
> the interest rates at full numbers eg 5, 6 etc. but i need to change
> them to 0.05, 0.06 but not sure how to go about this. Think it might be
> something to do with precision?
.
- References:
- Various Interest Rates
- From: shannon
- Re: Various Interest Rates
- From: mikm
- Re: Various Interest Rates
- From: shannon
- Various Interest Rates
- Prev by Date: Re: synchronized class
- Next by Date: Re: Is HTTP Stateful or Stateless?
- Previous by thread: Re: Various Interest Rates
- Next by thread: When will reflections support casting (especially for constructors, etc) properly?
- Index(es):
Relevant Pages
|