Mutiq Asri Utami 11108393 1ka20

  • 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 Mutiq Asri Utami 11108393 1ka20 as PDF for free.

More details

  • Words: 365
  • Pages: 9
TUGAS PASCAL

ALGORITMA DAN PEMROGRAMAN 2A

MUTIQ ASRI UTAMI 11108393 1KA20

UNIVERSITAS GUNADARMA

1. Mengubah derajat temperatur, dari derajat Celcius ke derajat Fahreinheit dan Reamur.

USES CRT; VAR C,R,F : REAL; BEGIN CLRSCR; WINDOW(5,6,25,78); TEXTBACKGRAOUND(yellow); TEXTCOLOR(red); SOND(220); WRITE (‘ MASUKKAN NILAI C = ‘); READLN (C); R := C *(5/9); WRITELN(‘ REAMUR = ‘,R); F := C + 273; WRITELN(‘FAHRENHAIT = ‘,F); NOSOUND; READLN; END.

2. Luas dan Keliling lingkaran, dengan jari-jari diketahui.

USES CRT; VAR C,R,F : REAL; BEGIN CLRSCR; WINDOW(5,6,25,78); TEXTBACKGRAOUND(BLUE); TEXTCOLOR(YELLOW); SOND(220); WRITE (‘ MASUKKAN NILAI C = ‘); READLN (C); R := C *(5/9); WRITELN(‘ REAMUR = ‘,R); F := C + 273; WRITELN(‘FAHRENHAIT = ‘,F); NOSOUND; READLN; END.

3. Menghitung Luas dan Keliling segitiga sembarang yang

sisinya. USES CRT; VAR A,B,C,K,L : REAL; BEGIN CLRSCR; WINDOW(5,5,40,80); TEXTBACKGROUND(red); TEXTCOLOR(green); A := 6; B := 7; C := 8; K := A + B + C; GOTOXY (15,15); WRITELN('KELILING = ',K); L := (A+B)/2; GOTOXY (20,16); WRITELN('LUAS = ',L); READLN; END.

diketahui ke tiga

4. Mencari nilai Sinus, Cosinus, dan Tangen dengan sudut diinput. USES CRT; VAR X : REAL; BEGIN CLRSCR; WINDOW(5,5,40,80); TEXTBACKGROUND(WHITE); TEXTCOLOR(red); SOUND(70); WRITE(‘BESAR SUDUT = ‘); READLN(X); WRITELN(‘SIN = ‘,SIN(X)); WRITELN(‘COS= ‘,COS(X)); WRITELN(‘TAN = ‘,ARCTAN(X)); NOSOUND; READLN; END.

5. Mencari akar dan kuadrat dari suatu nilai.

USES CRT; VAR X : REAL; BEGIN CLRSCR; WINDOW(5,5,40,80); TEXTBACKGROUND(RED); TEXTCOLOR(GREEN); SOUND(80); WRITE(‘MASUKKAN NILAI = ‘); READLN(X); GOTOXY(11,27); WRITELN(‘AKAR = ‘,SQRT(X):9:3); GOTOXY(20,38); WRITELN(‘PANGKAT = ‘,SQR(X):9:3); NOSOUND; READLN; END

6. Mencari nilai bulat dan pecahan dari suatu nilai yang

dimasuk kan melalui keyboard (diinput). Nilai pecahan tersebut dibulatkan sampai 3 angka dibelakang koma.

USES CRT; VAR X : REAL; BEGIN CLRSCR; WINDOW(5,9,35,80); TEXTBACKGROUND(YELLOW); TEXTCOLOR(RED); SOUND(80); WRITE(‘MASUKKAN NILAI = ‘); READLN(X); GOTOXY(17,24); WRITELN(‘PECAHAN= ‘,FRAC(X):5:3); GOTOXY(18,21); WRITELN(‘BILANGAN BULAT = ‘,INT(X):5:3); NOSOUND; READLN; END.

Tampilkan nama dan NPM anda di dalam window, dan terletak pada tengahtengah layar. 7.

USES CRT; BEGIN CLRSCR; WINDOW(5,8,31,80); TEXTBACKGROUND(blue); TEXTCOLOR(white); SOUND(85); GOTOXY(33,10); WRITELN ('NAMA : mutiq asri utami '); GOTOXY(33,11); WRITELN ('NPM : 11108393'); NOSOUND; READLN; END.

Tampilkan tulisan 'STMIK GUNADARMA' di dalam window pada pojok kanan atas dengan ukuran window sama dengan tulisan tersebut. 8.

USES CRT; BEGIN CLRSCR; WINDOW(1,2,60,80); TEXTBACKGROUND(red); TEXTCOLOR(yellow); SOUND(60); GOTOXY(65,1); WRITELN ('STMIK GUNADARMA'); NOSOUND; READLN; END.

Related Documents

Utami - Copy.docx
June 2020 11
Asri Mohidin.docx
June 2020 14
Asri Nitip
October 2019 30
Asri Furniture.docx
April 2020 16
Asri Bidaah
November 2019 26