TUGAS ALGORITMA DAN PEMROGRAMAN

OLEH :

NAMA KELOMPOK       :
1.     Aida Agustin
2.     Anita Safitri
3.     Anvita Riliani
4.     Diah Septia Ningrum
5.     Dian Asmaul Husna

     
JURUSAN EKONOMI DAN BISNIS
POLITEKNIK NEGERI LAMPUNG
BANDAR LAMPUNG
2015



SOAL
1.       Cetak angka 1-10!
a.    For
b.    Do While
c.     Repeat Until
2.       Cetaklah bilangan ganjil sampai dengan 10 suku!
1, 3, 5, 7, 9, 11, 13, 15, 17, 19.
a.       For
b.      Do While
c.       Repeat Until
3.       Cetaklah angka 5, 10, 15, 20, 25, 30, 35, 40, 45, 50!
a.       For
b.      Do While
c.       Repeat Until
4.       Cetaklah angka 3, 9, 27, 81, 243, 729, 2187, 6561, 19683, 59049!
a.       For
b.      Do While
c.       Repeat Until
5.       a
a a
a a a
a a a a
6.       5
5 4
5 4 3
5 4 3 2
5 4 3 2 1
7.       1
1 2
1 2 3
1 2 3 4
1 2 3 4 5
8.       ?
? ?
? ? ?
9.       1
1 3
1 3 5
1 3 5 7
1 3 5 7 9
10.   2
2 4
2 4 6
2 4 6 8
2 4 6 8  10


JAWABAN
1.       – Flowchart

Start
i
A = 1
For i = 1 To 10 Do
A = A + 1
Cetak    A

End
 


























-          Pseudocode
a.       For
Start
I = int
A = int
A = 1
For i = 1 To 10 Do {
A = A + 1
Cetak A
End }

b.      While Do
c.       Repeat Until






2.       – Flowchart

Start
i
A = 1
For i = 1 To 10 Do
A = A + 2
Cetak    A

End
 



















-          Pseudocode
a.       For
Start
I = int
A = int
A = 1
For i = 1 To 10 Do {
A = A + 3
Cetak A
End }

b.      While Do
c.       Repeat Until









5. - Flowchart



start
X,b
For x = 1 to 4 do
For b = 1 to x do
tak          A

Pindah baris
End
 

















-          Pseudocode
Start
X = int
B = int
{For x = 1 to 4 do
{For b = 1 to x
Cetak a
End}
End}








8. Pseudocode
Start
X = int
B = int
{For  x = 1 To 3 Do
{For b = 1 To x
Cetak  ?
End}
End}





Komentar

Postingan populer dari blog ini

LOGIKA PREDIKAT

KALIMAT BERKUANTOR (LOGIKA PREDIKAT)

MAKALAH Paket Program Niaga