You are on page 1of 2

I=0

J=0

V=0

T1 = I

T2 = J

T3 = V

Imprimir (“DESORDENADO \n”)

E1: If T1 > 10 then goto E2

T2 = vector[i]

T2 = T1

E3:

T2 = T2 – 1

Vector[j+1] = Vector [j]

If j >= 0 then goto E4

T1 = T1 + 1

goto E1

E4: if vector[j] > v then goto E3

Vector[j+1] = T3

T1 = T1 + 1

goto E1

E2: imprimir (“\n ORDENADO \n”)

T1 = 0

E5: if T1 > 10 goto SALIR

Imprimir (“%d”, vector[i])

T1 = T1 + 1

Goto E5

SALIR:

You might also like