Advertisement
Guest User

Untitled

a guest
Jun 28th, 2017
59
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.81 KB | None | 0 0
  1. Variables i , j , posLet , posCle , posNouv Entiers
  2. Variables cle , mot , alpha , let , letAl , letCle Caractères
  3. Début
  4. alpha <- "ABCDEFGHIJKLMNOPQRSTUVWXYZ"
  5. Ecrire "Entrez le mot-clé"
  6. Lire cle
  7. Ecrire "Entrez le mot à coder"
  8. Lire mot
  9. Pour i <- 1 à len(mot)
  10. Si mid(mot , i , 1) <> " " Alors
  11. Let <- Mid(mot , i , 1)
  12. posLet <- Trouve(alpha , let)
  13. Si i < len(cle) Alors
  14. letCle <- Mid(cle , i , 1)
  15. posCle <- Trouve(alpha , letCle)
  16. posNouv <- posLet + posCle
  17. Sinon
  18. j <- i mod len(cle)
  19. Si j = 0 Alors
  20. j <- len(cle)
  21. FinSi
  22. letCle <- Mid(cle , j , 1)
  23. posCle <- Trouve(alpha , letCle)
  24. posNouv <- posLet + posCle
  25. FinSi
  26. Si posNouv > 26 Alors
  27. posNouv <- posNouv - 26
  28. FinSi
  29. letAl <- Mid(alpha , posNouv , 1)
  30. Ecrire letAl
  31. FinSi
  32. i Suivan
  33. Fin
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement