Skip to main content
added 8 characters in body
Source Link
evanstar3
  • 388
  • 2
  • 9

C (gcc), 169169 166 bytes

#include<ctype.h>
#define W while(
#define D isdigit(*c))
#define P putchar(
#define R W*c&&while(*c&&!D c++;
main(char*c,int**v){c=v[1];P 91);R do{W while(D P*c++);R P*c?44:93);}W*cwhile(*c);}

Try it online!Try it online!

C (gcc), 169 bytes

#include<ctype.h>
#define W while(
#define D isdigit(*c))
#define P putchar(
#define R W*c&&!D c++;
main(char*c,int**v){c=v[1];P 91);R do{W D P*c++);R P*c?44:93);}W*c);}

Try it online!

C (gcc), 169 166 bytes

#include<ctype.h>
#define D isdigit(*c))
#define P putchar(
#define R while(*c&&!D c++;
main(char*c,int**v){c=v[1];P 91);R do{while(D P*c++);R P*c?44:93);}while(*c);}

Try it online!

added 357 characters in body
Source Link
evanstar3
  • 388
  • 2
  • 9

CC (gcc), 169 bytes

#include<ctype.h>
#define W while(
#define D isdigit(*c))
#define P putchar(
#define R W*c&&!D c++;
main(char*c,int**v){c=v[1];P 91);R do{W D P*c++);R P*c?44:93);}W*c);}
#include<ctype.h>
#define W while(
#define D isdigit(*c))
#define P putchar(
#define R W*c&&!D c++;
main(char*c,int**v){c=v[1];P 91);R do{W D P*c++);R P*c?44:93);}W*c);}

Usage Example: ./a.out [1,2,[3],[[]]]Try it online!

C, 169 bytes

#include<ctype.h>
#define W while(
#define D isdigit(*c))
#define P putchar(
#define R W*c&&!D c++;
main(char*c,int**v){c=v[1];P 91);R do{W D P*c++);R P*c?44:93);}W*c);}

Usage Example: ./a.out [1,2,[3],[[]]]

C (gcc), 169 bytes

#include<ctype.h>
#define W while(
#define D isdigit(*c))
#define P putchar(
#define R W*c&&!D c++;
main(char*c,int**v){c=v[1];P 91);R do{W D P*c++);R P*c?44:93);}W*c);}

Try it online!

Source Link
evanstar3
  • 388
  • 2
  • 9

C, 169 bytes

#include<ctype.h>
#define W while(
#define D isdigit(*c))
#define P putchar(
#define R W*c&&!D c++;
main(char*c,int**v){c=v[1];P 91);R do{W D P*c++);R P*c?44:93);}W*c);}

Usage Example: ./a.out [1,2,[3],[[]]]