Help with getting 0 as average everytime

aslevelpascalnoob

Estimable
Oct 19, 2015
1
0
4,510
I keep just getting 0 for my average everytime i run this with any numbers, pls help
program Project1;

{$mode objfpc}{$H+}

uses SysUtils;
type list_of_num=array[1..10] of integer;
var
x: list_of_num;
i: integer;
avg: integer;
dif: integer;
sum: integer;
begin
i:=1;
Sum:=0;
Repeat
begin
Writeln('Enter a number');
Readln(x);
i:=i+1;
end;
until i=10;
sum:=sum+x;
avg:=sum DIV 10;
Writeln(avg);
Readln;
end.