fork(1) download
  1. #include <stdio.h>
  2.  
  3. void caesar(char bemenet[], char eredmeny[], int n){
  4. int i=0;
  5. for(i= 0; bemenet[i] != '\0'; i++) {
  6. // Compute the position of the replacement letter
  7. int pos = (bemenet[i] - 'a' + n) % 26;
  8. // Place the letter into the output.
  9. eredmeny[i] = 'a' + pos;
  10. }
  11. eredmeny[i] = '\0';
  12. }
  13.  
  14. int main(void) {
  15. char tomb1[]="caesarkodolas";
  16. char tomb2[250];
  17.  
  18. caesar(tomb1,tomb2,10);
  19.  
  20. printf("%s \n",tomb2);
  21.  
  22. return 0;
  23. return 0;
  24. }
  25.  
Success #stdin #stdout 0s 2248KB
stdin
Standard input is empty
stdout
mkockbuynyvkc