rounding/truncation problem, +.01 off in program

hhh
Last edited on
I think my error was using floats and not doubles for the equations and the monthly rate.

after changing float to double, the calculation now seems to work accurately

If im not correct on this, please let me know?

i will delete this in a few hours/the morning so nobody else from my own class can cheat :P
closed account (E0p9LyTq)
demon6552 wrote:
i will delete this in a few hours/the morning so nobody else from my own class can cheat :P

Yet it is acceptable for you to cheat?
i did not cheat. and in fact I figured out the answer before anyone on here or reddit even bothered to help me (some said it had to do with the wrong things but their help was incorrect).
... unless im still wrong :P.

I would be allowed to ask this question from the lab assistant or classmates. all code written was written by myself -- and is quite different than the example code I posted. Im not trying to plagiarize. the only intent on taking it down after getting help is so someone else does not plagiarize my code. that would be the only 'cheating' if someone else stole my code and used it.

I just did not think it was cheating to ask someone else at what point specifically in which I was making an error... especially seeing as I ended up solving it myself,

I wasnt asking for anything specifically like an answer or code -- just a "you forgot to cast" or, "
check your types, something is not right with assignment"javascript:thread211043.reply()

just basic hints at what went wrong.

otherwise, Id just be beating my head against a wall.

although with the change i made it seems to have the correct output
Last edited on
Topic archived. No new replies allowed.