GeSHi (eiffel):
indexing
Description: "Generador de quinielas automatico para laultimaesencia.com";
class QUINIELA
creation
make
feature
make is
local
t: MICROSECOND_TIME; enter: INTEGER; numeros: ARRAY[INTEGER]
do
!!numeros.make(1, 0)
io.put_string("Bienvenido al generador automatico de quinielas%N")
io.put_string("Por favor pulse la tecla enter cuando quiera 15 veces")
from
enter := 15
until
enter = 0
loop
t.update
io.put_string("Quedan " + enter.to_string + " enters%N")
io.read_line
t.update
numeros.add_last(t.microsecond)
enter := enter - 1
end
from
enter := 1
until
enter = 16
loop
if numeros.item(enter) \\ 2 = 0 then
io.put_string("1")
else
if numeros.item(enter) \\ 3 = 0 then
io.put_string("2")
else
io.put_string("X")
end
end
enter := enter + 1
end
io.put_string("%N")
end
end -- class QUINIELA
Created by GeSHI 1.0.7.20