You are on page 1of 3

Tes 10

Program Coba;
Var a, b : integer;
Begin
Readln (a);
Repeat
if a > 3 then
writeln(a);
a := a + 1;
until a > 5;
writeln(a);
end.

Pseudocode :

(1) Read(a)
(2) Repeat
(3) if a > 3
(4) then write(a)
(5) endif
(6) aa+1
(7) until a > 5
(8) write (a)

Flowchart :
1

T
3

4 F

F
7

8
Flowgraph :

3*

4 I

II
5

III
6

7*

Kompleksitas :

1. V(G) = E-N+2 = 9 – 8 + 2 = 3
2. P=2+1=3
3. Daerah = 2 + 1 = 3
4. Matriks :

1 2 3 4 5 6 7 8
1 1 0
2 1 0
3 1 1 1
4 1 0
5 1 0
6 1 0
7 1 1 1
8
2+1
=3

Independent Path :
I : 1-2-3-4-5-6-7-8

II : 1-2-3-5-6-7-8

III : 1-2-3-5-6-7-2-3-5-6-7-8

Kasus Uji :

I:a>5

II : a <= 3

III : a <= 5

You might also like