Re: Various Interest Rates



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?

.



Relevant Pages

  • Re: Various Interest Rates
    ... Rajah wrote: ... > Shannon, it's not so much the precision, but rather the declaration ...
    (comp.lang.java.programmer)
  • Re: float storage
    ... column to be modified must be empty to decrease precision or scale ... which I guess implies that number has more capacity than float. ... To increase the scale one must decrease the precision. ... or any declaration where Y was greater than X. ...
    (comp.databases.oracle.misc)
  • Re: double precision g77
    ... using IMPLICIT NONE at the start of all my routines and have done a "grep ... -i real *.f" to check I haven't missed a declaration. ... Did you also grep for all "CALL" statements to make sure found all ... double precision, other than by declaring them as such with a double ...
    (comp.lang.fortran)
  • Re: double confusion
    ... double precision a /2.0/ ... This block is one scope. ... (You should put an "implicit none" declaration at the beginning of your main program and each function or other scope unless you specifically want implicit declaration of this sort; otherwise it will mask all sorts of bugs like this.) ...
    (comp.lang.fortran)
  • Re: what is means in this Declaration?
    ... > i am having a problem about a Declaration such as follow ... text (or the standard, if you can read standard-speak, but a text is ... The "D" is the exponent letter for double precision. ...
    (comp.lang.fortran)