fork download
  1. void caeser_shift(char* text, int key)
  2. { while (*text) { *text = (*text + key-' ') % ('~'-' '+1) + ' '; text++;} }
  3.  
  4. int main(void)
  5. {
  6. char plaintext[] = "~~~Hello World this is a simple text";
  7.  
  8. caeser_shift(plaintext, 1);
  9.  
  10. printf("%s\n", plaintext);
  11.  
  12. return 0;
  13. }
Success #stdin #stdout 0s 4152KB
stdin
Standard input is empty
stdout
   Ifmmp!Xpsme!uijt!jt!b!tjnqmf!ufyu