Set up the account
Two errors that ruin the answer. r goes in as a decimal — 5% is 0.05, not 5. And n counts periods per year, not in total; monthly is always n = 12 whether t is 1 year or 40. The formula needs n > 0 and 1 + r/n > 0, which is automatic for any real deposit.