Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- # NOTE: Premier algorithme
- '''
- Afficher("Premier terme U de Un: ")
- Lire(U)
- Afficher("Raison Q de Un: ")
- Lire(Q)
- Afficher("Seuil S auquel s'arreter: ")
- Lire(S)
- Afficher("Indice N du premier terme: ")
- Lire(N)
- TANT_QUE U > S FAIRE
- U = U * Q
- N = N + 1
- FIN_TANT_QUE
- Afficher("C'est au rang n=", N, " que Un < ", S)
- '''
- # NOTE: Le programme commence ici
- U = float(input("Premier terme U de Un: "))
- Q = float(input("Raison Q de Un: "))
- S = float(input("Seuil S auquel s'arreter: "))
- N = float(input("Indice N du premier terme: "))
- while U > S:
- U = U * Q
- N = N + 1
- print "C'est au rang n=", N, " que Un < ", S
- # NOTE: Le programme se termine ici
Add Comment
Please, Sign In to add comment