Code:
annInt = amount * rate * 1;
Code:
return amount * rate * 1;
the last multiplication is redundant.
Code:
// declare variables
annInt = amount * rate * 1;
This line doesn't do anything. None of your variables have been initialized. By doing this, annInt won't automatically update itself when you change the value of amount or rate.
I see you labeled it "declared variables". I think you want initialize variables (give a value to the variables)
The variables have been declared here:
Code:
int year;
double rate;
double amount;
double annInt;
You can work on your indenting as well.