Pascal mania the morning, this time I will explain how to create a program to find area of a triangle. This program essentially describes bahwasannya formula of a triangle itself is (Area = ½ xaxt). simply follow the steps below carefully.
How to make triangle formula:
- Please open your program Turbo pascal.
- select file - new
- Then write the code as below.
- then select compile - compile or alt + f9 to make sure there are no errors in your program code.
- if there are no errors please select run - run.
- congratulations you can make the program look for their own area of the triangle.
program luas_segitiga;
uses crt;
var a,t,l : real;
begin
clrscr;
writeln('MENCARI LUAS SEGITIGA');
writeln;
write('masukkan alas :'); readln(a);
write('masukkan tinggi :'); readln(t);
l:=0.5*a*t;
writeln('luas segitiga :',l:0:0);
readln;
end.
uses crt;
var a,t,l : real;
begin
clrscr;
writeln('MENCARI LUAS SEGITIGA');
writeln;
write('masukkan alas :'); readln(a);
write('masukkan tinggi :'); readln(t);
l:=0.5*a*t;
writeln('luas segitiga :',l:0:0);
readln;
end.
* Greeting pascal mania and may be useful.
0 Response to "how to create a formula for the area of a triangle with TURBO PASCAL 7.0"
Post a Comment