function [] = prog1main()

// Display mode
mode(0);

// Display warning for floating point exception
ieee(1);

s = input("enter 1.Spalte von Q bitte ")
if max(size(mtlb_double(s)))<=0 then
  break;
end;

z = input("enter 1.Zeile von Q  bitte")
if max(size(mtlb_double(s)))~=max(size(mtlb_double(z))) then
  break;
end;

x = input("enter X bitte ")
if max(size(mtlb_double(x)))~=max(size(mtlb_double(z))) then
  break;
end;

sums = 0;
sumz = 0;

for i = 1:max(size(mtlb_double(s)))
  sums = mtlb_a(sums,mtlb_double(mtlb_e(s,i))*mtlb_double(mtlb_e(x,i)));
  sumz = mtlb_a(sumz,mtlb_double(mtlb_e(z,i))*mtlb_double(mtlb_e(x,i)));
end;

disp("Ergebniss von Aufgabe 1:")
disp((sums*sumz)/mtlb_double(mtlb_e(s,1)))


a = [1,5,8,0,2,6,9,3,7,4];
xx = input("enter X von Aufgabe 2 bitte ")
y(1,1:4) = 0;
for i = 1:4
  y = mtlb_i(y,i,a(i)*mtlb_double(mtlb_e(xx,i)));
end;
l = 4+1;
for k = 1:3
  for j = 1:4-k
    y = mtlb_i(y,j,mtlb_a(y(j),a(l)*mtlb_double(mtlb_e(xx,j+k))));
    y = mtlb_i(y,j+k,mtlb_a(y(j+k),a(l)*mtlb_double(mtlb_e(xx,j))));
    l = l+1;
  end;
end;

disp("Ergebniss von Aufgabe 2:")
disp(y)





endfunction



