Skip to content

Instantly share code, notes, and snippets.

@anekos
Created May 22, 2019 04:01
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save anekos/acc74b85a3858ae8020829cac571b259 to your computer and use it in GitHub Desktop.
Save anekos/acc74b85a3858ae8020829cac571b259 to your computer and use it in GitHub Desktop.
#include <stdio.h>
#include <stdlib.h>
int main(int argc, char *argv[]) {
if (0 < argc) {
printf("%d\n", main(-argc, argv));
return 0;
}
if (-argc - 1) {
return atoi(argv[-argc - 1]) + main(argc + 1, argv);
} else {
return 0;
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment