Vclass Tri Handayani

  • May 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 Vclass Tri Handayani as PDF for free.

More details

  • Words: 497
  • Pages: 8
Tugas V-CLASS 2 Nama : Tri Handayani NPM: 11108962 Kelas : 1 KA 20

Kuis II V-CLASS No.1 PROGRAM ING; USES CRT; VAR a : INTEGER; BEGIN CLRSCR; WRITE('MASUKKAN NILAI INTEGER : ');READLN(a); IF a > 0 THEN WRITELN(a,' adalah bilangan positif') ELSE WRITELN(a,' bukan bilangan positif'); READLN; END.

No.2 PROGRAM POSITIP; USES CRT; VAR a : INTEGER; BEGIN CLRSCR; WRITE('MASUKAN BILANGAN BULAT : ');READLN(a); IF (a >= 0) THEN WRITELN('Nilai ',a,' adalah positif') ELSE IF (a < 0) THEN WRITELN('Nilai ',a,' adalah negatif'); READLN; END.

No.3 PROGRAM NOL; USES CRT; VAR a : INTEGER; BEGIN CLRSCR; WRITE('MASUKKAN BILANGAN : ');READLN(a); IF (a > 0) THEN WRITELN('Nilai ',a,' adalah positif') ELSE IF (a < 0) THEN WRITELN('Nilai ',a,' adalah negatif') ELSE IF (a = 0) THEN WRITELN('Nilai Nol'); READLN; END.

No.4 Program Urut_Bilangan; Uses crt; Var A,B,C:integer; Begin clrscr; Writeln(':::Program Mengurutkan Bilangan:::'); Writeln('==============================='); Writeln; Write('Masukkan Nilai : ');readln(A); Write('Masukkan Nilai : ');readln(B); Write('Masukkan Nilai : ');readln(C); Writeln; Writeln(':::::::::::::::::::'); if (A<=B) and (A<=C) then if (B<=C) then Writeln(A,' ',B,' ',C) else Writeln(A,' ',C,' ',B) else if (B<=A) and (B<=C) then if (A<=C) then Writeln(B,' ',A,' ',C) else Writeln(B,' ',C,' ',A) else if (C<=A) and (C<=B) then if (A<=B) then Writeln(C,' ',A,' ',B) else Writeln(C,' ',B,' ',A); Writeln(':::::::::::::::::::'); readln; End.

No.5 Program Urut_Bilangan; Uses crt; Var A,B,C:integer; Begin clrscr; Writeln(':::Program Mengurutkan Bilangan:::'); Writeln('==============================='); Writeln; Write('Masukkan Nilai : ');readln(A); Write('Masukkan Nilai : ');readln(B); Write('Masukkan Nilai : ');readln(C); Writeln; Writeln(':::::::::::::::::::'); if (A
No.6 PROGRAM ANGKA; USES CRT; VAR a : INTEGER; BEGIN CLRSCR; WRITELN('Masukkan salah satu angka dari 1-9 : ');READLN(a); IF a = 1 THEN WRITELN('SATU') ELSE IF a = 2 THEN WRITELN('DUA') ELSE IF a = 3 THEN WRITELN('TIGA') ELSE IF a = 4 THEN WRITELN('EMPAT') ELSE IF a = 5 THEN WRITELN('LIMA') ELSE IF a = 6 THEN WRITELN('ENAM') ELSE IF a = 7 THEN WRITELN('TUJUH') ELSE IF a = 8 THEN WRITELN('DELAPAN') ELSE IF a = 9 THEN WRITELN('SEMBILAN') ELSE WRITELN('BILANGAN SELAIN 1-9'); READLN; END.

No.7 PROGRAM BONUS; USES CRT; VAR A,B,C,D,E,F : INTEGER; BEGIN CLRSCR; WRITELN('MENU'); WRITELN('1. GOLONGAN KARYAWAN'); WRITELN('2. GAK JADI'); WRITE('MASUKKAN PILIHAN : ');READLN(A); CASE A OF 1: BEGIN WRITELN; WRITELN('STAFF ATAU NONSTAFF : '); WRITELN('1. STAFF'); WRITELN('2. NONSTAFF'); WRITE('MASUKKAN PILIHAN ANDA : ');READLN(B); CASE B OF 1: BEGIN WRITE('UMUR ANDA : ');READLN(C); WRITE('LAMA BEKERJA : ');READLN(D); IF (C rel="nofollow">=50) AND (D>=5) THEN WRITELN('ANDA MENDAPAT BONUS 1.000.000') ELSE IF (C<50) THEN WRITELN('ANDA MENDAPAT BONUS 300.000') ELSE IF (D<5) THEN WRITELN('ANDA MENDAPAT BONUS 500.000'); READLN; END; 2: BEGIN WRITE('UMUR ANDA : ');READLN(E); WRITE('LAMA BEKERJA : ');READLN(F); IF (F>=5) THEN WRITELN('ANDA MENDAPAT BONUS 400.000') ELSE IF (E<50) THEN WRITELN('ANDA MENDAPAT BONUS 250.000'); READLN; END; 2: END; END; END; END.

Related Documents

Vclass
November 2019 14
Vclass 3
May 2020 11
Tugas Vclass Achsan
May 2020 19
Tri
October 2019 65