Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- Variables i , j , posLet , posCle , posNouv Entiers
- Variables cle , mot , alpha , let , letAl , letCle Caractères
- Début
- alpha <- "ABCDEFGHIJKLMNOPQRSTUVWXYZ"
- Ecrire "Entrez le mot-clé"
- Lire cle
- Ecrire "Entrez le mot à coder"
- Lire mot
- Pour i <- 1 à len(mot)
- Si mid(mot , i , 1) <> " " Alors
- Let <- Mid(mot , i , 1)
- posLet <- Trouve(alpha , let)
- Si i < len(cle) Alors
- letCle <- Mid(cle , i , 1)
- posCle <- Trouve(alpha , letCle)
- posNouv <- posLet + posCle
- Sinon
- j <- i mod len(cle)
- Si j = 0 Alors
- j <- len(cle)
- FinSi
- letCle <- Mid(cle , j , 1)
- posCle <- Trouve(alpha , letCle)
- posNouv <- posLet + posCle
- FinSi
- Si posNouv > 26 Alors
- posNouv <- posNouv - 26
- FinSi
- letAl <- Mid(alpha , posNouv , 1)
- Ecrire letAl
- FinSi
- i Suivan
- Fin
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement