Witam.
Powie mi ktoś co jest w tym nie tak że nie pokazuje mi prawidłowych obliczeń?
moduł(tpu)
unit uPole;
interface
function pole(a,b,c,d,e:integer):integer;
implementation
function pole(a,b,c,d,e:integer):integer;
var Pole1,Pole2,Pole3:integer;
begin
Pole1:=ab;
Pole2:=cd;
Pole3:=e*e;
end;
end.
i program
program wyliczanie_pol;
uses crt,uPole;
var a,b,c,d,e,pole1,pole2,pole3,wybor:integer;
begin
clrscr;
writeln('program sluzacy do obliczenia pol');
writeln('Wpisz ktore pole chcesz obliczyc');
writeln('1 prostokat');
writeln('2 romb');
writeln('3 kwadrat');
Writeln('wyborem twoim jest...');
read(wybor);
case wybor of
1: begin
writeln('podaj dlugosc boku a');
readln(a);
writeln('podaj dlugosc boku b');
readln(b);
writeln('pole wynosi...',pole1);
readln;
end;
2: begin
writeln('podaj dlugosc boku a');
readln(c);
writeln('podaj wyskokosc h');
readln(d);
writeln('pole wynosi...',pole2);
readln;
end;
3: begin
writeln('podaj dlugosc boku a');
readln(e);
writeln('pole wynosi...',pole3);
readln;
end;
end;
end.