program testavg; uses crt; {-------------------------------------------------------------------------- This program will find the total grade for a group of 3 weighted tests. by --------------------------------------------------------------------------} VAR a,x,r,b,c:real; begin clrscr; textcolor(green); write ('What is the grade for the first test? ---> '); readln (x); write ('and the weight, as a decimal? ---> '); readln (r); a := x * r; writeln; write ('second? ---> '); readln (x); write ('and the weight, as a decimal? ---> '); readln (r); b := x * r; writeln; write ('third? ---> '); readln (x); write ('and the weight, as a decimal? ---> '); readln (r); c := x * r; writeln ('The weighted score for the first test is ',a:0:2); writeln ('The weighted score for the second test is ',b:0:2); writeln ('The weighted score for the third test is ',c:0:2); writeln; a := a + b + c ; writeln ('The overall weighted grade is ',a:0:2); readln; end.