fork(1) download
  1. #include <stdio.h>
  2. #include <stdlib.h>
  3. #include <string.h>
  4. #include <alloca.h>
  5.  
  6. void shifrator(char * s) {
  7. for (int i = 0; i < strlen(s); ++i) {
  8. s[i] = s[i] / 2;
  9. }
  10. }
  11.  
  12. void deshifrator(char * s) {
  13. for (int i = 0; i < strlen(s); ++i) {
  14. s[i] = s[i] * 2;
  15. }
  16. }
  17.  
  18. int main() {
  19. char * stroka = alloca(100);
  20. strcpy(stroka, "Съешь же ещё этих мягких французских булок, да выпей чаю.");
  21. shifrator(stroka);
  22. deshifrator(stroka);
  23. printf("%s\n", stroka);
  24. return 0;
  25. }
Success #stdin #stdout 0s 9424KB
stdin
Standard input is empty
stdout
ТҊж҈Ҍ жж жҊҒ Ҏ҂и҆ мҐдки҆ ҄Ҁао҆҄и҂ки҆ в҄мок, да вҌ�жк ҈аҎ.