Autor Tema: Ayuda con programa en Qbasic64

0 Usuarios y 1 Visitante están viendo este tema.

06 Marzo, 2012, 01:44 am
Leído 1351 veces

Maramech

  • $$\Large \color{#6a84c0}\pi$$
  • Mensajes: 13
  • Karma: +0/-0
  • Sexo: Masculino
DIM numbers(10) AS INTEGER
DIM high AS INTEGER
DIM low AS INTEGER
DIM x AS INTEGER

CLS
PRINT
PRINT
FOR x = 1 TO 10
    INPUT "Enter a number: ", numbers(x)
NEXT x

high = number(1)
low = number(1)

FOR x = 2 TO 10
    IF numbers(x) > high THEN
        high = numbers(x)
    END IF
NEXT x

FOR x = 2 TO 10
    IF numbers(x) < low THEN
        low = numbers(x)
    END IF
NEXT x

CLS
PRINT "Array Numbers"
FOR x = 1 TO 10
    PRINT numbers(x); " ";
NEXT x

PRINT
PRINT
PRINT "The highest number: "; high
PRINT "The lowest number: "; low

Hola el codigo que ven es el del programa mi duda es que cuando lo corro siempre me da como low 0, alguien puede ver en que me estoy equivocando? Gracias

06 Marzo, 2012, 02:12 am
Respuesta #1

Maramech

  • $$\Large \color{#6a84c0}\pi$$
  • Mensajes: 13
  • Karma: +0/-0
  • Sexo: Masculino
Ya encontre el problema que torpe soy disculpen