Advertisement
Guest User

Untitled

a guest
Dec 15th, 2018
74
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.55 KB | None | 0 0
  1. void chiffrer(int cle, char* mot)
  2. {
  3. int taille = strlen(mot);
  4. int compteur = 0;
  5. for (int i = 0; i<taille; i++)
  6. {
  7. if (verification(mot,i)==0)
  8.  
  9. {
  10. mot[i]=mot[(taille+cle)%26];
  11. }
  12. if (verification(mot,i)==1)
  13. {
  14. mot[i]=mot[(taille+cle)%26];
  15. }
  16. if (verification(mot,i)==2)
  17. {
  18. mot[i]=mot[(taille+cle)%10];
  19. }
  20. else
  21. {
  22. while (compteur != cle )
  23. {
  24. mot[i]=mot[i+1]%127;
  25. if (verification(mot,i)==3)
  26. {
  27. compteur++;
  28. }
  29. }
  30. }
  31. }
  32. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement