input(i) while i0 then if x>0 or y=3 then

13
input(I) while I<17 do input(X,Y) if Y>0 then if X>0 OR Y=3 then Y := -X else Y:=-Y end_if_else else Y := X+Y end_if_else I := I+1 end_while

Upload: kail

Post on 06-Feb-2016

45 views

Category:

Documents


0 download

DESCRIPTION

input(I) while I0 then if X>0 OR Y=3 then Y := -X else Y:=-Y end_if_else else Y := X+Y end_if_else I := I+1 end_while. s1. s1 input(I) while I0 then - PowerPoint PPT Presentation

TRANSCRIPT

Page 1: input(I)      while I0 then          if X>0 OR Y=3 then

input(I)

while I<17 do

input(X,Y)

if Y>0 then

if X>0 OR Y=3 then

Y := -X

else

Y:=-Y

end_if_else

else

Y := X+Y

end_if_else

I := I+1

end_while

Page 2: input(I)      while I0 then          if X>0 OR Y=3 then

s1 input(I)

while I<17 do

s2 input(X,Y)

if Y>0 then

if X>0 OR Y=3 then

s3 Y := -X

else

s4 Y:=-Y

end_if_else

else

s5 Y := X+Y

end_if_else

s6 I := I+1

end_while

s2

s3s4s5

s6

s1

Page 3: input(I)      while I0 then          if X>0 OR Y=3 then

s1 input(I)

while I<17 do

s2 input(X,Y)

if Y>0 then

if X>0 OR Y=3 then

s3 Y := -X

else

s4 Y:=-Y

end_if_else

else

s5 Y := X+Y

end_if_else

s6 I := I+1

end_while

s2

s3s4s5

b3b4

b5b6

b1

b2

s6

s1

Page 4: input(I)      while I0 then          if X>0 OR Y=3 then

s1 input(I)

while I<17 do

s2 input(X,Y)

if Y>0 then

if X>0 OR Y=3 then

s3 Y := -X

else

s4 Y:=-Y

end_if_else

else

s5 Y := X+Y

end_if_else

s6 I := I+1

end_while

s2

s3s4s5

b3b4

b5b6

b1

b2

c2:

c3:

s6

s1

c4:

c1:

Page 5: input(I)      while I0 then          if X>0 OR Y=3 then

s1 input(I)

while I<17 do

s2 input(X,Y)

if Y>0 then

if X>0 OR Y=3 then

s3 Y := -X

else

s4 Y:=-Y

end_if_else

else

s5 Y := X+Y

end_if_else

s6 I := I+1

end_while

s2

s3s4s5

b3b4

b5b6

b1

b2

c2:

c3:

s6

s1

c4:

TT, TF, FT, FF

c1:

Page 6: input(I)      while I0 then          if X>0 OR Y=3 then

s1 input(I)

while I<17 do

s2 input(X,Y)

if Y>0 then

if X>0 OR Y=3 then

s3 Y := -X

else

s4 Y:=-Y

end_if_else

else

s5 Y := X+Y

end_if_else

s6 I := I+1

end_while

s2

s3s4s5

b3b4

b5b6

b1

b2

c1:

c2:

c3:

s6

s1

c4:

TT, TF, FT, FF

Page 7: input(I)      while I0 then          if X>0 OR Y=3 then

s1 input(I)

while I<17 do

s2 input(X,Y)

if Y>0 then

if X>0 OR Y=3 then

s3 Y := -X

else

s4 Y:=-Y

end_if_else

else

s5 Y := X+Y

end_if_else

s6 I := I+1

end_while

s2

s3s4s5

b3b4

b5b6

b1

b2

c1: T

c2:

c3:

s6

s1

c4:

TT, TF, FT, FF

Page 8: input(I)      while I0 then          if X>0 OR Y=3 then

s1 input(I)

while I<17 do

s2 input(X,Y)

if Y>0 then

if X>0 OR Y=3 then

s3 Y := -X

else

s4 Y:=-Y

end_if_else

else

s5 Y := X+Y

end_if_else

s6 I := I+1

end_while

s2

s3s4s5

b3b4

b5b6

b1

b2

c1: T

c2:

c3:

s6

s1

c4:

TT, TF, FT, FF

Page 9: input(I)      while I0 then          if X>0 OR Y=3 then

s1 input(I)

while I<17 do

s2 input(X,Y)

if Y>0 then

if X>0 OR Y=3 then

s3 Y := -X

else

s4 Y:=-Y

end_if_else

else

s5 Y := X+Y

end_if_else

s6 I := I+1

end_while

s2

s3s4s5

b3b4

b5b6

b1

b2

c2: T

c3:

s6

s1

c4:

TT, TF, FT, FF

c1: T

Page 10: input(I)      while I0 then          if X>0 OR Y=3 then

s1 input(I)

while I<17 do

s2 input(X,Y)

if Y>0 then

if X>0 OR Y=3 then

s3 Y := -X

else

s4 Y:=-Y

end_if_else

else

s5 Y := X+Y

end_if_else

s6 I := I+1

end_while

s2

s3s4s5

b3b4

b5b6

b1

b2

c1: T,F

c2: T

c3: T

s6

s1

c4: T

TT, TF, FT, FF

Page 11: input(I)      while I0 then          if X>0 OR Y=3 then

s1 input(I)

while I<17 do

s2 input(X,Y)

if Y>0 then

if X>0 OR Y=3 then

s3 Y := -X

else

s4 Y:=-Y

end_if_else

else

s5 Y := X+Y

end_if_else

s6 I := I+1

end_while

s2

s3s4s5

b3b4

b5b6

b1

b2

c1: T,F

c2: T

c3: T

s6

s1

c4: T

TT, TF, FT, FF

Page 12: input(I)      while I0 then          if X>0 OR Y=3 then

s1 input(I)

while I<17 do

s2 input(X,Y)

if Y>0 then

if X>0 OR Y=3 then

s3 Y := -X

else

s4 Y:=-Y

end_if_else

else

s5 Y := X+Y

end_if_else

s6 I := I+1

end_while

s2

s3s4s5

b3b4

b5b6

b1

b2

c1: T,F

c2: T

c3: T

s6

s1

c4: T

TT, TF, FT, FF

Page 13: input(I)      while I0 then          if X>0 OR Y=3 then

s1 input(I)

while I<17 do

s2 input(X,Y)

if Y>0 then

if X>0 OR Y=3 then

s3 Y := -X

else

s4 Y:=-Y

end_if_else

else

s5 Y := X+Y

end_if_else

s6 I := I+1

end_while

s2

s3s4s5

b3b4

b5b6

b1

b2

c1: T,F

c2: T

c3: T

s6

s1

c4: T

TT, TF, FT, FF