Algoritma Pemrograman 2 A Achsan

1,955 views

Published on

Published in: Technology, Business
0 Comments
1 Like
Statistics
Notes
  • Be the first to comment

No Downloads
Views
Total views
1,955
On SlideShare
0
From Embeds
0
Number of Embeds
8
Actions
Shares
0
Downloads
57
Comments
0
Likes
1
Embeds 0
No embeds

No notes for slide

Algoritma Pemrograman 2 A Achsan

  1. 1. Tugas Algoritma & Pemrograman 2A Nama : Hidayat Siddiq Kurniawan Npm : 10108972 Kelas : 1KA20
  2. 4. 2. MENGHITUNG LUAS DAN KELILING LINGKARAN   USES CRT; VAR R,L,K : REAL; BEGIN CLRSCR; WINDOW(10,13,27,80); TEXTBACKGROUND(WHITE); TEXTCOLOR(RED); SOUND(115); WRITELN('--------------------------------------'); WRITELN('MENGHITUNG LUAS DAN KELILING LINGKARAN'); WRITELN('--------------------------------------'); WRITE('MASUKKAN JARI-JARI = ');READLN(R); K := 2 * (22/7)*R; WRITELN('KELILING = ',K:4:2); L := (22/7)* R * R; WRITELN('LUAS = ',L:4:2); NOSOUND; READLN; END.        
  3. 5.   OUTPUT DARI PROGRAM LUAS :
  4. 6. 3. MENGHITUNG LUAS DAN KELILING SEGITIGA  USES CRT; VAR A,B,C,K,L : REAL; BEGIN CLRSCR; WINDOW(5,5,35,70); TEXTBACKGROUND(WHITE); TEXTCOLOR(BLUE); WRITELN('---------------------------------------------------'); WRITELN(' PROGRAM MENGHITUNG LUAS DAN KELILING SEGITIGA '); WRITELN('---------------------------------------------------'); A := 17; B := 12; C := 8; WRITELN('MASUKKAN NILAI A = 17'); WRITELN('MASUKKAN NILAI B = 12'); WRITELN('MASUKKAN NILAI C = 8'); WRITELN('HASILNYA ADALAH'); K := A + B + C; GOTOXY(9,9); WRITELN('KELILING = ',K); L := (A+B)/2; GOTOXY(9,10); WRITELN('LUAS = ',L); READLN; END.
  5. 7. OUTPUT DARI PROGRAM LUAS DAN KELILING SEGITIGA :
  6. 8. 4. MENENTUKAN NILAI SIN, COS, DAN TANGEN   USES CRT; VAR X : REAL; BEGIN CLRSCR; WINDOW(5,5,35,68); TEXTBACKGROUND(WHITE); TEXTCOLOR(GREEN); SOUND(70); WRITELN('-------------------------------------'); WRITELN('MENENTUKAN NILAI SIN, COS, DAN TANGEN'); WRITELN('-------------------------------------'); WRITE('BESAR SUDUT = '); READLN(X); WRITELN('SIN = ',SIN(X):4:2); WRITELN('COS = ',COS(X):4:2); WRITELN('TAN = ',ARCTAN(X):4:2); NOSOUND; READLN; END.
  7. 9. OUTPUT PROGRAM NILAI SIN, COS DAN TANGEN :
  8. 10.   5. MENCARI AKAR DAN KUADRAT DARI SUATU NILAI   USES CRT; VAR X : REAL; BEGIN CLRSCR; WINDOW(5,5,35,68); TEXTBACKGROUND(WHITE); TEXTCOLOR(BLACK); SOUND(270); WRITELN('-----------------------------------------'); WRITELN('MENCARI AKAR DAN KUADRAT DARI SUATU NILAI'); WRITELN('-----------------------------------------'); WRITE('MASUKKAN NILAI = ');READLN(X); GOTOXY(7,7); WRITELN('AKAR = ',SQRT(X):9:3); GOTOXY(9,8); WRITELN('PANGKAT = ',SQR(X):9:3); NOSOUND; READLN; END.  
  9. 11. OUTPUT PROGRAM AKAR DAN KUADRAT DARI SUATU NILAI :
  10. 12. 6. MENCARI NILAI BULAT DAN PECAHAN  USES CRT; VAR X : REAL; BEGIN CLRSCR; WINDOW(5,7,32,70); TEXTBACKGROUND(WHITE); TEXTCOLOR(BLUE); SOUND(1000); WRITELN('-----------------------------------'); WRITELN(' MENCARI NILAI BULAT DAN PECAHAN '); WRITELN('-----------------------------------'); WRITE('MASUKKAN NILAI = '); READLN(X); GOTOXY(5,8); WRITELN('PECAHAN= ',FRAC(X):5:3); GOTOXY(5,11); WRITELN('BILANGAN BULAT = ',INT(X):5:3); NOSOUND; READLN; END.        
  11. 13. OUTPUT PROGRAM MENCARI NILAI BULAT DAN PECAHAN :
  12. 14. 7. MENAMPILKAN NAMA DAN NPM DI TENGAH LAYAR   USES CRT; BEGIN CLRSCR; WINDOW(5,7,32,70); TEXTBACKGROUND(WHITE); TEXTCOLOR(GREEN); SOUND(350); GOTOXY(30,10); WRITELN('NAMA : HIDAYAT SK'); GOTOXY(30,11); WRITELN('NPM : 10108972'); NOSOUND; READLN; END.            
  13. 15. OUTPUT PROGRAM MENAMPILKAN NAMA DAN NPM DI TENGAH LAYAR :
  14. 16. 8. MENULIS STMIK GUNADARMA DI POJOK KANAN ATAS LAYAR & UKURAN WINDOW SAMA!!   USES CRT; BEGIN CLRSCR; WINDOW(1,2,65,70); TEXTBACKGROUND(RED); TEXTCOLOR(WHITE); SOUND(185); GOTOXY(66,1); WRITELN('STMIK GUNADARMA'); NOSOUND; READLN; END.            
  15. 17. OUTPUT PROGRAM MENULIS STMIK GUNADARMA DI POJOK KANAN ATAS LAYAR :

×