Here's the assignment I was given:
The government introduces a new program of educational savings accounts. It adds a 20% bonus of whatever you contributed to the account up to a maximum of a $400 for a $2000 annual deposit. Create a program called CollegeSavings that obtains an amount deposited by the user and outputs the balance in the account including the bonus from the government.
So I set up this code
I know this is ridden with flaws but I just need to know where did I go wrong. If anyone was kind enough a revised code wouldn't hurt.PHP Code:
import hsa.*;
// The "CollegeSavings" class.
public class CollegeSavings
{
public static void main (String[] args)
{double deposit, bonus, output;
Stdout.println("Please input annual deposit up to $2000 annual deposit");
deposit=Stdin.readDouble();
if (deposit>20000, bonus>400)
Stdout.println("Unacceptable entry");
else if (deposit<=2000, bonus<=400)
output=(deposit*1.20);
Stdout.println("College savings grant:" + "$" + output);}
// Place your code here
} // main method
} // CollegeSavings class