Program Pascal

  • Uploaded by: Ade Pragawan
  • 0
  • 0
  • 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 Program Pascal as PDF for free.

More details

  • Words: 432
  • Pages: 12
PASCAL 1. Mengubah derajat temperatur, dari derajat Celcius ke derajat Fahreinheit dan Reamur (derajat Celcius diinput) USES CRT; VAR C,R,F : REAL; BEGIN CLRSCR; WINDOW(5,6,25,78); TEXTBACKGRAOUND(MAGENTA); TEXTCOLOR(WHITE); 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. Menghitung Luas dan Keliling lingkaran, dengan jari-jari diketahui (diinput). USES CRT; VAR R,L,K : REAL; BEGIN CLRSCR; WINDOW(10,13,27,80); TEXTBACKGROUND(WHITE); TEXTCOLOR(GREEN); SOUND(115); WRITE(‘MASUKKAN JARI-JARI = ‘ ); READLN(R); K := 2 * (22/7)*R; WRITE (‘ KELILING = ‘, K);

L := (22/7)* R * R; WRITE (‘LUAS = ‘,L); NOSOUND; READLN; END.

3. Menghitung Luas dan Keliling segitiga sembarang yang diketahui ketiga sisinya. USES CRT; VAR A,B,C,K,L : REAL; BEGIN CLRSCR; WINDOW(5,5,35,70); TEXTBACKGROUND(YELLOW); TEXTCOLOR(BLUE);

A := 3; B := 4; C := 5; K := A + B + C; GOTOXY (13,13); WRITELN(‘KELILING = ‘,K); L := (A+B)/2 GOTOXY (20,16); WRITELN(‘LUAS = ‘,L); READLN; END.

4. Mencari nilai Sinus, Cosinus, dan Tangen dengan sudut diinput. USES CRT;

VAR X : REAL; BEGIN CLRSCR; WINDOW(5,5,35,68); TEXTBACKGROUND(WHITE); TEXTCOLOR(CYAN); 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 (nilai diinput). USES CRT; VAR X : REAL; BEGIN CLRSCR; WINDOW(5,5,35,68); TEXTBACKGROUND(WHITE); TEXTCOLOR(BLACK); SOUND(70); WRITE(‘MASUKKAN NILAI = ‘); READLN(X); GOTOXY(11,20);

WRITELN(‘AKAR = ‘,SQRT(X):9:3); GOTO XY(13,44); WRITELN(‘PANGKAT = ‘,SQR(X):9:3); NOSOUND; READLN; END.

6. Mencari nilai bulat dan pecahan dari suatu nilai yang dimasukan melalui keyboard (diinput). Nilai pecahan tersebut dibulatkan sampai 3 angka dibelakang koma (,). USES CRT; VAR X : REAL; BEGIN CLRSCR; WINDOW(5,7,32,70);

TEXTBACKGROUND(WHITE); TEXTCOLOR(red); SOUND(85); WRITE(‘MASUKKAN NILAI = ‘); READLN(X); GOTOXY(11,14); WRITELN(‘PECAHAN= ‘,FRAC(X):5:3); GOTOXY(15,20); WRITELN(‘BILANGAN BULAT = ‘,INT(X):5:3); NOSOUND; READLN; END.

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

USES CRT; BEGIN CLRSCR; WINDOW(5,7,32,70); TEXTBACKGROUND(WHITE); TEXTCOLOR(red); SOUND(85); GOTOXY(30,10); WRITELN (‘NAMA : Anak-ank ‘); GOTOXY(30,11); WRITELN (‘NPM : 1KA20’); NOSOUND; READLN; END.

8. Tampilkan tulisan ‘STMIK GUNADARMA’ di dalam window pada pojok kanan atas dengan ukuran window sama dengan tulisan tersebut. USES CRT; BEGIN CLRSCR; WINDOW(1,2,65,70); TEXTBACKGROUND(GREEN); TEXTCOLOR(red); SOUND(85); GOTOXY(65,1); WRITELN (‘STMIK GUNADARMA’); NOSOUND; READLN; END.

Posted in Uncategorized | No Comments »

Hello world! April 1, 2009 by pragawan1ka20

Welcome to WordPress.com. This is your first post. Edit or delete it and start blogging! Posted in Uncategorized | 1 Comment » •



Pages o



Archives o



Uncategorized (2)

Blogroll o o



April 2009

Categories o



About

WordPress.com WordPress.org

Meta o o o o

Log in Valid XHTML XFN WordPress

Blog at WordPress.com.

Related Documents

Program Pascal
April 2020 5
Sample Pascal Program
June 2020 2
Pascal
November 2019 47
Pascal
October 2019 35
Pascal
November 2019 37

More Documents from ""

15843718
April 2020 4
Program Pascal
April 2020 5
Program 1
April 2020 7
Modul Pascal
April 2020 7
Naruto
April 2020 12
Kie Apt Vr.docx
June 2020 23