Skip to main content
Golfed
Source Link
twentysix
  • 409
  • 2
  • 5

Lua, 205 203203 188 bytes

a,b=...p,c,s,f=prints=print,a.rep,a.len,a.format r=s(a)+sd=s(a)%2+1r=d%2+d+1 p(c(" ",r)..c("_",s(b)))p(a..c(" ",sformat(a)%2)..""%s%s/"..b.."%s = "..f("%%."..s(a)d.."f",a,c(" ",d%2),b,b^(1/a)))for i=1,r//2 do p(c(" ",i-1).."\\"..c(" ",r-i*2-1).."/")end

Attempt This Online!Attempt This Online! Explanation soon:tm: once I'm outExplanation soon:tm: once I'm out of school. I added an explanation to the footer of schoolthe ATO link.

enter image description here enter image description here

Lua, 205 203 bytes

a,b=...p,c,s,f=print,a.rep,a.len,a.format r=s(a)+s(a)%2+1 p(c(" ",r)..c("_",s(b)))p(a..c(" ",s(a)%2).."/"..b.." = "..f("%."..s(a).."f",b^(1/a)))for i=1,r//2 do p(c(" ",i-1).."\\"..c(" ",r-i*2-1).."/")end

Attempt This Online! Explanation soon:tm: once I'm out of school.

enter image description here

Lua, 205 203 188 bytes

a,b=...p,c,s=print,a.rep,a.len d=s(a)r=d%2+d+1 p(c(" ",r)..c("_",s(b)))p(a.format("%s%s/%s = %."..d.."f",a,c(" ",d%2),b,b^(1/a)))for i=1,r//2 do p(c(" ",i-1).."\\"..c(" ",r-i*2-1).."/")end

Attempt This Online! Explanation soon:tm: once I'm out of school. I added an explanation to the footer of the ATO link. enter image description here

I forgot a space near the varargs.
Source Link
twentysix
  • 409
  • 2
  • 5

Lua, 205 204203 bytes

a,b=... p,c,s,f=print,a.rep,a.len,a.format r=s(a)+s(a)%2+1 p(c(" ",r)..c("_",s(b)))p(a..c(" ",s(a)%2).."/"..b.." = "..f("%."..s(a).."f",b^(1/a)))for i=1,r//2 do p(c(" ",i-1).."\\"..c(" ",r-i*2-1).."/")end

Attempt This Online!Attempt This Online! Explanation soon:tm: once I'm out of school.

enter image description here

Lua, 205 204 bytes

a,b=... p,c,s,f=print,a.rep,a.len,a.format r=s(a)+s(a)%2+1 p(c(" ",r)..c("_",s(b)))p(a..c(" ",s(a)%2).."/"..b.." = "..f("%."..s(a).."f",b^(1/a)))for i=1,r//2 do p(c(" ",i-1).."\\"..c(" ",r-i*2-1).."/")end

Attempt This Online! Explanation soon:tm: once I'm out of school.

enter image description here

Lua, 205 203 bytes

a,b=...p,c,s,f=print,a.rep,a.len,a.format r=s(a)+s(a)%2+1 p(c(" ",r)..c("_",s(b)))p(a..c(" ",s(a)%2).."/"..b.." = "..f("%."..s(a).."f",b^(1/a)))for i=1,r//2 do p(c(" ",i-1).."\\"..c(" ",r-i*2-1).."/")end

Attempt This Online! Explanation soon:tm: once I'm out of school.

enter image description here

i'm a mess
Source Link
twentysix
  • 409
  • 2
  • 5

Lua, 205205 204 bytes

a,b=... p,c,s,f=print,a.rep,a.len,a.format r=s(a)++s(a%2+1a)%2+1 p(c(" ",r)..c("_",s(b)))p(a..c(" ",a%2s(a)%2).."/"..b.." = "..f("%."..s(a//2+1).."f",b^(1/a)))for i=1,r//2 do p(c(" ",i-1).."\\"..c(" ",r-i*2-a%21).."/")end

Attempt This Online! ExplanationAttempt This Online! Explanation soon:tm: once I'm out of school.

enter image description hereenter image description here

Lua, 205 bytes

a,b=...p,c,s,f=print,a.rep,a.len,a.format r=s(a)+(a%2+1)p(c(" ",r)..c("_",s(b)))p(a..c(" ",a%2).."/"..b.." = "..f("%."..s(a//2+1).."f",b^(1/a)))for i=1,r//2 do p(c(" ",i-1).."\\"..c(" ",r-i*2-a%2).."/")end

Attempt This Online! Explanation soon:tm: once I'm out of school.

enter image description here

Lua, 205 204 bytes

a,b=... p,c,s,f=print,a.rep,a.len,a.format r=s(a)+s(a)%2+1 p(c(" ",r)..c("_",s(b)))p(a..c(" ",s(a)%2).."/"..b.." = "..f("%."..s(a).."f",b^(1/a)))for i=1,r//2 do p(c(" ",i-1).."\\"..c(" ",r-i*2-1).."/")end

Attempt This Online! Explanation soon:tm: once I'm out of school.

enter image description here

Source Link
twentysix
  • 409
  • 2
  • 5
Loading