Usuario:Juansbotero/Ejercicio 19

De Wikilibros, la colección de libros de texto de contenido libre.

#CONTRATO: numero mayor (entero,booleano → entero)

#PROPOSITO: Leer lista de números distinos de cero (el útltimo

# número de la seria es -99) y obtener el número mayor. Indicar

#si alguno de los números leídos es negativo

#DEFINICION:

def numero mayor (a, b, c)
  read a
  read b
  read c
    if a == 0 or b == 0 or c == 0
      a=0
      b=0
      c=0	
    else
     return a
     return b
     retunr c
    if a<o
      print “negativo”
    elif b<0
      print “negativo”
    elif c<0
      print “negativo”
    else
      return a
      return b
      return c
    if a>b and a>c 
      print a
    elif b>a and b>c
      print b
    else
      print c


#EJEMPLO: numero mayor (7, -9, 8)debe dar 8 y -9 es negativo

print numero mayor (7, -9, 8)