0% found this document useful (0 votes)
53 views

Praktikum 10 (Looping: While, Do ... While)

This document contains 7 programming problems and their high-level solutions in pseudocode. The problems include: 1) Displaying all characters except X, 2) Calculating the total of input numbers, 3) Finding the sum, max, and min of input numbers, 4) Displaying a sequence of numbers, 5) Counting characters and spaces, 6) Counting digits in a number, 7) Calculating the duration of an installment plan for Hajj payments. The pseudocode uses structures like START, END, INPUT, IF/THEN, WHILE loops, and arithmetic/comparison operations.

Uploaded by

Prathama Nugraha
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
53 views

Praktikum 10 (Looping: While, Do ... While)

This document contains 7 programming problems and their high-level solutions in pseudocode. The problems include: 1) Displaying all characters except X, 2) Calculating the total of input numbers, 3) Finding the sum, max, and min of input numbers, 4) Displaying a sequence of numbers, 5) Counting characters and spaces, 6) Counting digits in a number, 7) Calculating the duration of an installment plan for Hajj payments. The pseudocode uses structures like START, END, INPUT, IF/THEN, WHILE loops, and arithmetic/comparison operations.

Uploaded by

Prathama Nugraha
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 5

Pramudita Prathama Nugraha

2110171040

D4 IT B PRAKTIKUM 10
( Looping : while,do ... while )
1. Program menampilkan semua karakter kecuali X (x besar)

START

Input hrf

T
Cek
hrf != X

Cetak hrf

END

2. Program menghitung total angka yang dimasukkan


START

jml=0
jwb=y

jml=jml+bil

Cetak jwb

Cek T
jwb==y

Y Cetak jml

Cetak bil

END
3. Program mencari jumlah, nilai maks, nilai min
START

i=0
min=0
max=0
jml=0
jwb=y

Input n

jml=jml+bil

Cetak jwb

Cek max<bil Y
|| max==0
max=bil

Y
Cek min>bil
|| max==0
min=bil

Cek
jwb==y
T

Y
Cetak jml
Cetak bil
4. Program yang menampilkan deret angka 0 1 3 6 10 15 21 28
START

i=0
tot=0

Input n

Cek i<=n

tot=tot+i

Cetak tot

i=i+2 END

5. Program menghitung jumlah karakter dan spasi


START

jmlhrf=0
jmlspasi=0

Input hrf

Cek hrf==

jmlhrf++

jmlspasi++

Cek hrf!=\n

END
6. Program menghitung jumlah angka pada suatu bilangan
START a
b

jml=0
Y
Cek
kar==1 angka=1
Input kar

T
a

Cek Y
angka=2v
b kar==2

jml=jml+angka T

Cek Y
Cetak kar angka=3
kar==3

T
Cek Y
hrf!=\n Cek
kar==4 angka=4

T
Cetak kar
Cek Y
angka=5
kar==5
END

Y
Cek
angka=6
kar==6

Y
Cek
angka=7
kar==7

Y
Cek
angka=8
kar==8

Cek Y
angka=9
kar==9
T
7. Program menghitung lamanya bulan pencicilan biaya haji
START

tot=25000k
sisa=total
i=1

Input cicilan,
naik

T
Cek sisa>0
i++
Y

Y
Cek i%12==0 sisa=total+total*naik/100

T
sisa=sisa-cicilan

END Cetak i

You might also like