Help with combining doubles and int
Hello to all-
I have a newbie problem. How do you combine a doubles with a int.
First, the variables that I have are: dollars*years*rate/100
Second, the "year" is in the int. format
Third, the "dollars, rate and the divided by 100" are in the double format.
I need to combine those to have just one value or total of all of those variables that I have listed in the second sentence.
I have something like this, but this is not compilng:
double paidInterest = (int)(dollars*years*rate/100);
The paidInterest or total or one values, is the product that I need from the variable calculation.
This paidInterest will display in GUI "show message box"
Note, I have included below, a example of one out of the 3 "input messages" box. And of course the other 2 GUI,s are are in the double format.
String oneRevolution = JOptionPane.showInputDialog(null,"How many years will you take the loan?(whole number)");
year = Integer.parseInt(oneRevolution); ]
Anyhelp or suggestions
Last Post: 01-23-2003, 01:08 PM
-- Android Development Center
-- Cloud Development Project Center
-- HTML5 Development Center
-- Windows Mobile Development Center