Guest User

Untitled

a guest
Dec 13th, 2017
84
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.64 KB | None | 0 0
  1. # NOTE: Premier algorithme
  2. '''
  3. Afficher("Premier terme U de Un: ")
  4. Lire(U)
  5. Afficher("Raison Q de Un: ")
  6. Lire(Q)
  7. Afficher("Seuil S auquel s'arreter: ")
  8. Lire(S)
  9. Afficher("Indice N du premier terme: ")
  10. Lire(N)
  11.  
  12. TANT_QUE U > S FAIRE
  13. U = U * Q
  14. N = N + 1
  15. FIN_TANT_QUE
  16.  
  17. Afficher("C'est au rang n=", N, " que Un < ", S)
  18. '''
  19.  
  20. # NOTE: Le programme commence ici
  21. U = float(input("Premier terme U de Un: "))
  22. Q = float(input("Raison Q de Un: "))
  23. S = float(input("Seuil S auquel s'arreter: "))
  24. N = float(input("Indice N du premier terme: "))
  25. while U > S:
  26. U = U * Q
  27. N = N + 1
  28. print "C'est au rang n=", N, " que Un < ", S
  29. # NOTE: Le programme se termine ici
Add Comment
Please, Sign In to add comment