Your "amount" variable holds the amount paid on one particular day. So if you take this amount and minus 1 million form it.. the pay must be greater than 1 million if > 0 holds true.
Type: Posts; User: ppme
Your "amount" variable holds the amount paid on one particular day. So if you take this amount and minus 1 million form it.. the pay must be greater than 1 million if > 0 holds true.
total - 1mil > 0
{
tell users earned more than 1 mil
}
amount - 1mil >0
{
tell users more than 1 mil a day
}
New variable, "total"
total += amount;
jTextArea1.append( day + " " + pay.format(amount) + "\n"); Outside and Inside the loop! :) Sorry should of been more clear
Making "day" a global variable and putting this line : jTextArea1.append( day + " " + pay.format(amount) + "\n");
Before the for loop should also fix the problem.
Or an if...