Tugas Vclass Achsan

  • 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 Tugas Vclass Achsan as PDF for free.

More details

  • Words: 585
  • Pages: 6
Nama Kelas NPM Tugas

: Dian Wahyu Utami :1KA20 :10108579 : VClass Algoritma Dan Pemrograman 2A(PA ACHSAN)

SOAL 1 PROGRAM SOAL1KUIS2; USES CRT; CONST X = '---------------------------------------------------------------'; VAR A : INTEGER; BEGIN CLRSCR; WRITELN(X); WRITELN(' HANYA UNTUK ANGKA YANG BERNILAI POSITIF '); WRITELN(X); WRITE('MASUKKAN NILAI INTEGER YANG ANDA INGINKAN !! ');READLN(A); WRITELN; IF A > 0 THEN WRITELN('NILAI POSITIF') ELSE WRITELN('ANDA SALAH MEMASUKKAN ANGKA !! HARUS MASUKKAN ANGKA POSITIF !!'); WRITELN(X); READLN; END.

SOAL 2 PROGRAM SOAL2KUIS2; USES CRT; CONST X='-----------------------------------------------------------------'; VAR A : INTEGER; BEGIN CLRSCR; WRITELN(X); WRITELN(' MENENTUKAN ANGKA, POSITIF ATAU NEGATIF ??? WRITELN(X); WRITE('MASUKKAN SEBUAH NILAI : ');READLN(A); WRITELN; IF A >= 0 THEN WRITELN('NILAI POSITIF') ELSE WRITELN('NILAI NEGATIF'); WRITELN(X); READLN; END.

SOAL 3 PROGRAM SOAL3KUIS2; USES CRT; VAR A : INTEGER; BEGIN CLRSCR; WRITE('MASUKKAN NILAI A: ');READLN(A); IF A > 0 THEN WRITELN('NILAI POSITIF') ELSE IF A < 0 THEN WRITELN('NILAI NEGATIF') ELSE WRITELN('NILAI NOL'); READLN; END.

');

SOAL 4 Program soal4kuis2; 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.

SOAL 5 Program soal5kuis2; 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
SOAL 6 PROGRAM SOAL6KUIS2; USES CRT; VAR N : INTEGER; BEGIN CLRSCR; WRITE('MASUKAN ANGKA : ');READLN(N); IF N = 1 THEN WRITELN('SATU') ELSE IF N = 2 THEN WRITELN('DUA') ELSE IF N = 3 THEN WRITELN('TIGA') ELSE IF N = 4 THEN WRITELN('EMPAT') ELSE IF N = 5 THEN WRITELN('LIMA') ELSE IF N = 6 THEN WRITELN('ENAM') ELSE IF N = 7 THEN WRITELN('TUJUH') ELSE IF N = 8 THEN WRITELN('DELAPAN') ELSE IF N = 9 THEN WRITELN('SEMBILAN') ELSE IF N = 0 THEN WRITELN('NOL') ELSE WRITELN('HANYA UNTUK BILANGAN 0 S/D 9'); READLN; END.

SOAL 7 PROGRAM SOAL7KUIS2; USES CRT; CONST X = '==============================================='; VAR PILIH: BYTE; UMUR , THN : INTEGER; BONUS1 , BONUS2 , BONUS3 , BONUS4 , BONUS5 : REAL; BEGIN CLRSCR; WRITELN(X); WRITELN(' BONUS PEGAWAI '); WRITELN(X); WRITELN('PILIH GOLONGAN PEGAWAI'); WRITELN('1. STAFF'); WRITELN('2. NON STAFF'); WRITE('PILIH MENU NOMOR (1-2) : '); READLN(PILIH); CASE PILIH OF 1: BEGIN CLRSCR; WRITELN(X); WRITELN(' STAFF '); WRITELN(X); WRITELN; WRITE('BERAPA UMUR ANDA: ');READLN(UMUR); WRITE('BERAPA TAHUN ANDA BEKERJA: ');READLN(THN); BONUS1 := 1000000; BONUS2 := 500000; BONUS3 := 300000; IF (UMUR rel="nofollow">= 50) AND (THN >= 5) THEN WRITELN('BONUS ANDA : ',BONUS1:0:0) ELSE IF (THN < 5) THEN WRITELN('BONUS ANDA : ', BONUS2:0:0) ELSE IF (UMUR < 50) THEN WRITELN('BONUS ANDA : ',BONUS3:0:0); READLN; END; 2: BEGIN CLRSCR; WRITELN(X); WRITELN(' NON STAFF '); WRITELN(X); WRITE('BERAPA UMUR ANDA : ');READLN(UMUR); WRITE('BERAPA TAHUN ANDA BEKERJA : ');READLN(THN); BONUS4 := 400000; BONUS5 := 250000; IF (UMUR > 50) AND (THN > 5) THEN WRITELN('BONUS ANDA : ',BONUS4:0:0) ELSE IF (UMUR < 50) THEN WRITELN('BONUS ANDA : ',BONUS5:0:0); READLN; END; END; END.

Related Documents

Tugas Vclass Achsan
May 2020 19
Tugas Pa Achsan
April 2020 18
Tugas Pa Achsan
April 2020 17
Vclass
November 2019 14