Question

 Need Help with Java Code problem is with the math?

Answer Your first calculation should be the correct one, since yes, you do need powers.However, you're printing the result of the second, wrong calculation.This should work:> double total = investment * M... Read More »
http://answers.yahoo.com//question/index?qid=20120906120351AAaeI7r

Top Q&A For: Need Help with Java Code problem is with the math

Rounding problem in Java?

This has to do with binary math on 32-bit registers. Your handheld calculator is 48-bit. Your value rounded to the closest integer (int) which has no decimals. So, I use the String.format() method.... Read More »
http://answers.yahoo.com//question/index?qid=20081118102900AAZZCvm

Help with Java programming problem?

I just googled "java length of string" and it brought me to this page. That's all you have to do, and I found a link to the java documentation of the string class.http://docs.oracle.com/javase/1.4.... Read More »
http://answers.yahoo.com//question/index?qid=20120909175117AA8KVWU

Overflow problem in java?

How to get the powerof N without using a Math class in java?

Use a for loop. For example the following function returns the answer as an integer:private int printPowersOfN(int main, int power){int answer = main;for(int i = 1;i < power;i++){answer = answer * ... Read More »
http://answers.yahoo.com//question/index?qid=20120906145340AAJFGxU


feedback
loading