Week 2 Flashcards

1
Q

Case structure?

A
CASE OF tax_code
    0 : sales_tax = 0
    1 : sales_tax = purch_amt * 0.03
    2 : sales_tax = purch_amt * 0.05
ENDCASE
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
2
Q

3 Jenis Repetition?

A
  1. Leading decision loop
  2. Trailling decision loop
  3. Counted loop
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
3
Q

DOWHILE

A

termasuk Leading decision loop. Condition di test dlu baru eksekusi.

Format:
DOWHILE condition p is true
statement block
ENDDO

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
4
Q

REPEAT…UNTIL

A
Format:
REPEAT
    statement
    statement
UNTIL
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
5
Q

DO

A

Format:
DO loop_index = initial_value to final_value
statement block
ENDDO

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
6
Q

Prinsip structured programming?

A

one entry point, one exit point

How well did you know this?
1
Not at all
2
3
4
5
Perfectly