Documente Academic
Documente Profesional
Documente Cultură
Program P2;
type Punct=record
x, y : real
end;
Triunghi=record
A, B, C:Punct
end;
var T:Triunghi;
procedure AreaT();
begin
writeln('Dati coordonatele punctelor:');
readln(T.A.x, T.A.y, T.B.x, T.B.y, T.C.x, T.C.y);
writeln('Aria triunghiului:', 0.5*(T.A.x*(T.B.y-T.C.y)+T.B.x*(T.C.y-T.A.y)
+T.C.x*(T.A.y-T.B.y)));
end;
begin
AreaT();
end.
EX 6
program p1;
type Data=record
ziua: 1..31;
luna: 1..12;
anul: integer;
end;
Persoana=record
NumePrenume: string;
DataNasterii: Data;
end;
ListaPersoane=array[1..50] of Persoana;
T: ListaPersoane;
begin
for i:=1 to n do
begin
writeln;
end;
for i:=1 to n do
begin
end;
writeln(' Raspuns:');
end.