this is a pascal program that compute the area and Perimeter of the Triangle.
program PerimeterandAreas;
var a: char;
h,l,P,th,tl,S,Sl,Sh: integer;
begin
writeln('Please Select Problem /n (p)Perimeter (a)Area');
read(a);
if a = 'p' then
begin
writeln('you have selected Perimeter');
writeln('please Enter the lenght of the triangle');
read(l);
writeln('please Enter the height of the triangle');
read(h);
th := h * 2;
tl := l * 2;
P := th + tl;
writeln(P);
end;
if a = 'a' then
begin
writeln('you have selected Area');
writeln('please Enter the lenght of the triangle');
read(Sl);
writeln('please Enter the height of the triangle');
read(Sh);
S := Sh * Sl;
writeln(S);
end;
Note: Save the File with filename PerimeterandAreas.pass
Subscribe to:
Post Comments (Atom)
2 comments:
check my website here
http://jadeisaiahromano.me/
Доброе утро!
Такой обалдеть что за сайт.
Много приколов...Скорость, МДМА, Speed, Фен, и т.д.
Жми на сайт:
[b]
http://hudra.tyzavasaxi.tk
[/b]
Post a Comment