ループから抜け出せない理由がよくわかりません。これが私のプログラムです:
public static void main(String[] args) {
Scanner input = new Scanner (System.in);
double tution, rate, r, t, realpay, multiply, start;
start = 0;
while(start != -1)
{
System.out.print("Press 1 to start, -1 to end: ");
start = input.nextDouble();
System.out.print("Please enter the current tution fee for the year: ");
tution = input.nextDouble();
System.out.print("Enter in the amount of interest: ");
rate = input.nextDouble();
r = 1 + rate;
System.out.print("Please enter the number of years: ");
t = input.nextDouble();
multiply = Math.pow(r,t);
realpay = tution * multiply;
System.out.println("the cost of your tution fee: " + realpay);
if (start == -1)
{
break;
}
}
}
何が悪いのか教えていただけますか?