Ministério da Educação
Brasil um país de todos
Personal tools
You are here: Home Members Cicero Garrozi Disciplinas 2014 em diante Introdução à Programação Arquivos 2014-2 Algoritmos ordem-decrescente-de-3-numeros--combinacoes.py
Navigation
Log in


Forgot your password?
 
Document Actions

ordem-decrescente-de-3-numeros--combinacoes.py

by Cicero Garrozi last modified 2014-10-14 07:11

Click here to get the file

Size 1 kB - File type text/python-source

File contents

n1 = input("Digite o primeiro numero: ")
n2 = input("Digite o segundo numero: ")
n3 = input("Digite o terceiro numero: ")

if n1 >= n2 and n2 >= n3:
    print n1, n2, n3
elif n1 >= n3 and n3 >= n2:
    print n1, n3, n2
elif n2 >= n3 and n3 >= n1:
    print n2, n3, n1
elif n2 >= n1 and n1 >= n3:
    print n2, n1, n3
elif n3 >= n2 and n2 >= n1:
    print n3, n2, n1
elif n3 >= n1 and n1 >= n2:
    print n3, n1, n2

Powered by Plone CMS, the Open Source Content Management System

This site conforms to the following standards: