Calculate what you need on the final

Warning! Does not work in Internet Explorer

It does work in Mozilla, Mozilla Firefox, Netscape Navagator, and Opera.
Since Mozilla is free and I hate IE, I may or may not try to get it to work in IE.

This will calculate what you need on the final to make a grade of G (e.g to get a C enter a 70 in the desired grade field).
It uses the equations:

Replace no tests: F=(G-0.5*(T1+T2+T3)/3-0.1*H)/0.4
Replace one test: F=(30*G-5*(T_mid+T_high)-3*H)/17
Replace two tests: F=(30*G-5*T_high-3*H)/22
Replace three tests: F=(10*G-H)/9
where T1, T2, T3 are your test scores, T_mid is the middle test score, T_high is the high test score, G is the grade you want, and H is your homework/quiz score.
You can choose how many tests to replace.
Remember you are only guaranteed that one test will be replaced.
I make NO guarantees to the accuracy of these calculations, since I have not had time to check the program throughly.

Number of tests to replace:
Test 1=
Test 2=
Test 3=
Homework/Quiz=
Desired grade=
Your test average is
You need to make the following on the final
Your new test scores are:
low test=
mid test=
high test=
The code.