a->b->{String s[]="(,[,),],],[,[,],,=,,=".split("(a,"b),u="%s%sq]a,%s%sb[q{a<x<b} = ";for(intq{a<x&&x<b} i=0;i<4; q"+-~a+".."+~-b+"\n[a,b)q[a,b[q{vara<=x<b} t="q{%s<%sx<%s%sa<=x&&x<b}%"+(3 qa.."+~-b+"\n(i+1)/2)+"s=a,b]q]a,b]q{a<x<=b} ";Systemq{a<x&&x<=b} q"+-~a+".out.printf(u+u+t+tb\n[a,b]q[a,b]q{a<=x<=b}q{a<=x&&x<=b}qa..b").replace("x""a","x&&x"a+"")+"%s..%s%n",s[i%2],a,b,s[i/2+2],s[i%2+4],a,b,s[i/2+6],a,s[i%2+8],s[i/2+10],b,"",a,s[i%2+8],s[i/2+10],b,""replace("b",a+1-i%2b+"").replace("q",b-1+i++/2" = ");}}
Try it online!Try it online!
Credits