class Six Thousand {
public static void main(string args[]) {
double rate, money, payment;
int years;
rate = 0.054;
money= 5000;
payment = 6000;
years = 0;
// payment = (money * rate * years) + money;
years = (payment - money) / (money * rate);
whatsLeft = (payment - money) % (money * rate);
if (whatsLeft) {
System.out.print("It will take ");
System.out.print(years);
System.out.println(" years to get the money.");
how do write the if statement part, i'm trying to find out the remainder?
2007-08-04
08:19:42
·
1 answers
·
asked by
Calvin & Hobbes
4
in
Computers & Internet
➔ Programming & Design
and add one year
2007-08-04
08:25:23 ·
update #1