Algoritma Pemrograman 2a-achsan

  • April 2020
  • PDF

This document was uploaded by user and they confirmed that they have the permission to share it. If you are author or own the copyright of this book, please report to us by using this DMCA report form. Report DMCA


Overview

Download & View Algoritma Pemrograman 2a-achsan as PDF for free.

More details

  • Words: 369
  • Pages: 17
Tugas Algoritma & Pemrograman 2A (SOAL 1) Nama : Hidayat Siddiq Kurniawan Npm : 10108972 Kelas : 1KA20

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.

 

OUTPUT DARI PROGRAM LUAS :

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.

OUTPUT DARI PROGRAM LUAS DAN KELILING SEGITIGA :

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.

OUTPUT PROGRAM NILAI SIN, COS DAN TANGEN :

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.

OUTPUT PROGRAM AKAR DAN KUADRAT DARI SUATU NILAI :

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.

OUTPUT PROGRAM MENCARI NILAI BULAT DAN PECAHAN :

` 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.

   

OUTPUT PROGRAM MENAMPILKAN NAMA DAN NPM DI TENGAH LAYAR :

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.

     

OUTPUT PROGRAM MENULIS STMIK GUNADARMA DI POJOK KANAN ATAS LAYAR :

Related Documents