Download as pdf or txt
Download as pdf or txt
You are on page 1of 2

OBEDIENT BOAS JR PUTRO

20021106045
KELAS TIK1081B

ALGORITMA DAN PEMROGRAMAN


TUGAS 3
1. DEKLARASI : 𝑛, 𝑎, 𝑏, ket : Interger

Read(𝑛)

𝑎←1

𝑏←2

𝑎𝑛 ← 𝑎1 + (𝑛 − 1) ∗ 𝑏

If 𝑛 > 1, 𝒕𝒉𝒆𝒏

𝑘𝑒𝑡 ← (𝑎1 , … . , 𝑎𝑛 )

Else,
Do_loop
Check ‘masih ada data?’,’Y’.or.’y’
If ‘Y’.or’y’ Press then,
Do_Loop
Else
Continue
Output (Ket)
2. Pseucode oF → oC & oR

DEKLARASI : F, C, R : rill

Read(F)
C ← 5/9 (F-32)
R ← 4/9 (F-32)

Write (“°”F = “°”C = “°”R)

Flowchart oF → oC & oR

START

C ← 5/9 (F-32)
INPUT (F)
R ← 4/9 (F-32)

OUTPUT (“°”F = “°”C = “°”R)

END

You might also like