0% found this document useful (0 votes)
5 views10 pages

Cosinus Value Calculation Program

This document describes a program to calculate cosine values in Pascal. It contains: 1) An introduction section with the names of the authors. 2) A listing of the Pascal program code that defines variables, inputs angles, calculates cosine values using the COS function, and outputs the results to a string grid and list box. 3) Explanations of what the code in the button click event handlers does, which are to clear the list box or close the form.

Uploaded by

kesya_lie
Copyright
© Attribution Non-Commercial (BY-NC)
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
5 views10 pages

Cosinus Value Calculation Program

This document describes a program to calculate cosine values in Pascal. It contains: 1) An introduction section with the names of the authors. 2) A listing of the Pascal program code that defines variables, inputs angles, calculates cosine values using the COS function, and outputs the results to a string grid and list box. 3) Explanations of what the code in the button click event handlers does, which are to clear the list box or close the form.

Uploaded by

kesya_lie
Copyright
© Attribution Non-Commercial (BY-NC)
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd

Assalamu ‘alaikum

PERHITUNGAN NILAI
COSINUS
Diciptakan oleh :

Anisa Sari Dewi


Nenden Ulpa
Siti Kulsum
Depi Sri Pujiyanti
Sebelum di run
Sesudah di run
Listing Program
var
Form1: TForm1;
var
s:string;
A,X,R:real;
n:array[1..7]of string;
jml:array[1..7]of string;
 
implementation
 
{$R *.dfm}
Listing pada Button 1
procedure
TForm1.Button1Click(Sender:
TObject); begin
var sudut[i]:=inputbox('Loop','Masukk
A,X,R:real; an Besar Sudut
s:string; ke-'+inttostr(i),'');
p,i:integer; Qt[i]:=strtofloat(sudut[i]);
Sudut:array[1..7]of string; begin
Cosinus:array[1..7]of real; cosinus[i]:=cos(Qt[i]);
Qt:array[1..7]of real; end;
begin [Link]('Harga
[Link][0,0]:='Besar cosinus '+sudut[i]+' =
Sudut'; '+floattostr(cosinus[i]));
[Link][1,0]:='Nilai
Cosinus'; [Link][0,i]:=sudut[i];
for i:=1 to 7 do
[Link][1,i]:=floattost
r(cosinus[i]);
end;
end;
Listing pada BitButton 1 &
BitButton 2

procedure TForm1.BitBtn1Click(Sender: TObject);


begin
[Link];
end;

procedure TForm1.BitBtn2Click(Sender: TObject);


begin
close;
end;
end.
Wassalamu ‘alaikum Wr. Wb.

THE END/FIN

You might also like