tugas pascal 2
Upcoming SlideShare
Loading in...5
×
 

tugas pascal 2

on

  • 2,043 views

tugas

tugas

Statistics

Views

Total Views
2,043
Views on SlideShare
2,038
Embed Views
5

Actions

Likes
0
Downloads
34
Comments
0

1 Embed 5

http://www.slideshare.net 5

Accessibility

Upload Details

Uploaded via as Microsoft PowerPoint

Usage Rights

© All Rights Reserved

Report content

Flagged as inappropriate Flag as inappropriate
Flag as inappropriate

Select your reason for flagging this presentation as inappropriate.

Cancel
  • Full Name Full Name Comment goes here.
    Are you sure you want to
    Your message goes here
    Processing…
Post Comment
Edit your comment

tugas pascal 2 tugas pascal 2 Presentation Transcript

  • ALGORITMA & PEMROGRAMAN 2A NAMA : TUNSRI INDRA HIDAYAT NPM : 11108980
  • 1. MENGUBAH DERAJAT CELCIUS KE DERAJAT REAMUR DAN FAHRENHAIT
    • USES CRT;
    • VAR C,R,F : REAL;
      • BEGIN
      • CLRSCR;
      • WINDOW(5,6,25,78);
      • TEXTBACKGRAOUND( WHITE );
      • TEXTCOLOR(BLUE);
      • SOND(100);
        • WRITE (‘ MASUKKAN NILAI C = ‘);
        • READLN (C);
        • R := C *(5/9);
        • WRITELN(‘ REAMUR = ‘,R);
        • F := C + 273;
        • WRITELN(‘FAHRENHAIT = ‘,F);
      • NOSOUND;
      • READLN;
      • END.
  • OUTPUT
  • 2.MENGHITUNG LUAS DAN KELILING LINGKARAN
    • 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.
  • OUTPUT
  • 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);
        • A := 2;
        • B := 4;
        • C := 3;
        • K := A + B + C;
        • GOTOXY (13,13);
        • WRITELN(‘KELILING = ‘,K);
        • L := (A+B)/2
        • GOTOXY (20,16);
        • WRITELN(‘LUAS = ‘,L);
      • READLN;
      • END.
  • OUTPUT
  • 4. MENENTUKAN NILAI SIN,COS,DAN TANGEN
    • 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.
  • OUTPUT
  • 5. MENCARI AKAR DAN KUADRAT NILAI
    • 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.
  • OUTPUT
  • 6. MENCARI NILAI BULAT DAN PECAHAN
    • 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.
  • output
  • 7. Menampilkan nama dan npm di tengah layar
    • USES CRT;
      • BEGIN
      • CLRSCR;
      • WINDOW(5,7,32,70);
      • TEXTBACKGROUND(WHITE);
      • TEXTCOLOR(red);
      • SOUND(85);
        • GOTOXY(30,10);
        • WRITELN (‘NAMA : ERRISTHYA ‘);
        • GOTOXY(30,11);
        • WRITELN (‘NPM : 10108716’);
      • NOSOUND;
      • READLN;
      • END.
  • OUTPUT
  • 8. MENULIS STMIK GUNADARMA DI POJOK KANAN ATAS LAYAR & UKURAN WINDOW SAMA!!
    • USES CRT;
      • BEGIN
      • CLRSCR;
      • WINDOW(1,2,65,70);
      • TEXTBACKGROUND(GREEN);
      • TEXTCOLOR(red);
      • SOUND(85);
        • GOTOXY(65,1);
        • WRITELN (‘STMIK GUNADARMA’);
      • NOSOUND;
      • READLN;
      • END
  • OUTPUT