Add ecode.c

This commit is contained in:
BBaoVanC 2020-12-06 20:22:45 -06:00
parent 86c4afa38a
commit 939d4dd818
Signed by: bbaovanc
GPG Key ID: 18089E4E3CCF1D3A
1 changed files with 12 additions and 0 deletions

12
ecode.c Normal file
View File

@ -0,0 +1,12 @@
#include <stdio.h>
#include <stdlib.h>
int main(int argc, char *argv[]) {
if (argc == 2) {
int code = strtol(argv[1], NULL, 0);
return code;
} else {
printf("Requires exactly one argument\n");
return -1;
}
}