Dapatkan makalah STRATEGI
MANAJEMEN STRES SEBAGAI UPAYA PENCEGAHAN DAMPAK STRES KERJA PADA KARYAWAN selengkapnya klik disini
Wednesday, December 28, 2011
Monday, December 19, 2011
Categories: KUMPULAN TUGAS KULIAH
Sunday, November 20, 2011
PROGRAM CARI_BILANGAN_TERBESAR;
USES CRT;
VAR A,B,C:INTEGER;
BEGIN
CLRSCR;
WRITE('BILANGAN 1 : ');READLN(A);
WRITE('BILANGAN 2 : ');READLN(B);
WRITE('BILANGAN 3 : ');READLN(C);
IF (A=B) AND (B=C) AND (A=C) THEN WRITE('BILANGAN TERBESAR : ',A)
ELSE IF (A=B) AND (A>C) THEN WRITE(A)
ELSE IF (B=C) AND (B>A) THEN WRITE(B)
ELSE IF (A>B) AND (A>C) THEN WRITE(A)
ELSE IF (A>B) AND (A>C) THEN
WRITE(A)
ELSE IF (B>A) AND (B>C) THEN
WRITE(B)
ELSE
WRITE(C);
READLN;
END.
Categories: CODING BAHASA PEMROGRAMAN
Thursday, November 17, 2011
PROGRAM PASSWORD;
USES CRT;
VAR
X :INTEGER;
PW:STRING;
BEGIN
CLRSCR;
X:=3;
WHILE X>=1 DO BEGIN
WRITE('INPUT PASSWORD :');
READLN(PW);
IF (PW <> 'SEMANGAT') AND (X>=2) THEN
WRITELN('PASSWORD YANG ANDA MASUKKAN SALAH, KESEMPATAN TINGGAL',' ',X-1,'LAGI');
IF (PW <> 'SEMANGAT') AND (X=1) THEN
WRITE('INVALID PASSWORD');
IF PW='SEMANGAT' THEN BEGIN
WRITE('PASSWORD BENAR, ANDA DAPAT LOGIN');
X:=0;
END;
X:=X-1;
END;
READLN;
END.
Categories: CODING BAHASA PEMROGRAMAN
Wednesday, November 16, 2011
PROGRAM PROCEDURE_DAN_FUNCTION;
USES WINCRT;
PROCEDURE MENU;
BEGIN
GOTOXY(25,8);WRITE('1. LUAS PERSEGI');
GOTOXY(25,10);WRITE('2. LUAS SEGITIGA');
GOTOXY(25,12);WRITE('3. BILANGAN PANGKAT');
GOTOXY(25,14);WRITE('4. BILANGAN POSITIF NEGATIF');
GOTOXY(25,16);WRITE('5. KELUAR');
END;
FUNCTION LUAS_PERSEGI (S:INTEGER):LONGINT;
BEGIN
LUAS_PERSEGI:=SQR(S);
END;
FUNCTION SEGITIGA (A,T:INTEGER):LONGINT;
BEGIN
SEGITIGA:=A*T;
END;
PROCEDURE BIL_PANGKAT (A,B,C:LONGINT);
VAR I:INTEGER;
BEGIN
C:=1;
FOR I:=1 TO B DO BEGIN
C:=C*A;
END;
WRITE(A,' ^ ',B,' = ',C);
END;
Categories: CODING BAHASA PEMROGRAMAN
PROGRAM BILANGAN_FAKTORIAL_PROCEDURE;
USES WINCRT;
PROCEDURE FAKTORIAL (VAR B:INTEGER; VAR HSL:INTEGER);
VAR I:INTEGER;
BEGIN
CLRSCR;
HSL:=1;
FOR I:=B DOWNTO 1 DO
HSL:=HSL*I;
END;
{PROGRAM UTAMA}
VAR BIL,HASIL:INTEGER;
BEGIN
CLRSCR;
WRITE('INPUT BILANGAN : ');READLN(BIL);
FAKTORIAL(BIL,HASIL);
WRITELN(BIL,'! = ',HASIL);
READLN;
END.
Categories: CODING BAHASA PEMROGRAMAN
PROGRAM BILANGAN_FAKTORIAL_FUNCTION;
USES WINCRT;
FUNCTION FAKTORIAL (B:INTEGER):INTEGER;
VAR I,HSL:INTEGER;
BEGIN
CLRSCR;
HSL:=1;
FOR I:=B DOWNTO 1 DO
HSL:=HSL*I;
FAKTORIAL:=HSL;
END;
{PROGRAM UTAMA}
VAR BIL,HASIL:INTEGER;
BEGIN
CLRSCR;
WRITE('INPUT BILANGAN : ');READLN(BIL);
HASIL:=FAKTORIAL(BIL);
WRITELN(BIL,'! = ',HASIL);
READLN;
END.
Categories: CODING BAHASA PEMROGRAMAN
Thursday, November 3, 2011
TAMPILAN PROGRAM MENGHITUNG PANGKAT
KODE PROGRAM
Option Explicit
Dim X As Integer
Dim Y As Integer
Dim HSL As Long
Dim I As Byte
Private Sub Command1_Click()
X = Val(Text1.Text)
Y = Val(Text2.Text)
HSL = 1
For I = 1 To Y
HSL = HSL * X
Text3.Text = Str(HSL)
Next
End Sub
Private Sub Command2_Click()
Text1.Text = ""
Text2.Text = ""
Text3.Text = ""
End Sub
Private Sub Command3_Click()
Unload Me
End Sub
Categories: CODING BAHASA PEMROGRAMAN
Subscribe to:
Posts (Atom)