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. if(bemenet[i] == 'z') {
  7. eredmeny[i] = 'a';
  8. eredmeny[i] += n-1;
  9. }
  10. else
  11. {
  12. eredmeny[i] = bemenet[i] + n;
  13. }
  14. }
  15. eredmeny[i] = '\0';
  16. }
  17.  
  18. int main(void) {
  19. char tomb1[]="caesarkodolas";
  20. char tomb2[250];
  21.  
  22. caesar(tomb1,tomb2,10);
  23.  
  24. printf("%s \n",tomb2);
  25.  
  26. return 0;
  27. return 0;
  28. }
  29.  
Success #stdin #stdout 0s 2292KB
stdin
Standard input is empty
stdout
mko}k|uynyvk}