I am supposed to create a Pascal program that obtains 4 inputs from user and averages them. The program should enforce all inputs to be between 0 and 100, inclusive. This is for class, but more importantly I have more programs and I need to understand why I suck at this. Not looking for an easy answer. I appreciate any help.
ERROR messages
pro4.pas(15,20) Warning: Variable NUM does not seem to be initialized
pro4.pas(25) Fatal: Unexpected end of file
PROGRAM pro4(input,output);
VAR
tot, num, i: integer; ave: real;
BEGIN
ave:= tot/4;
for i:= 1 to 4 do begin
writeln (output, 'Enter integer');
readln (input, num + tot);
while(num>=0) and (num<=100) do begin
writeln(output, 'Get another integer');
readln(input, ave);
end ;