Skip to main content
added 57 characters in body
Source Link
AZTECCO
  • 11k
  • 1
  • 17
  • 60

C (clang), 170 147 143 143137 bytes

a,j,i;f(m*m,x,z)char*m;{for(;*m;m+=x)for(j=z;j--;puts(""))for(i=-1;++i<x*z;putchar((a-92?a-47?a-45?a-95|j:j-~j-z:i%z-j:~j+z-i%z)?32:a))a=m[i/z];} 

Try it online!Try it online!

  • thanks to @ceilingcat suggestion !
  • added for loop instead of recursion
  • thanks to @Johan du Toit for suggesting using int*array as input!

f(m*m,x,z)char*m;{ function taking:

  • m : charchar int array without newlines
  • x : width
  • z : scale

m+=x;*m&&f(m,x,z); => for(;*m;m+=x)
for every row of input, loop actually better than recursion.

for(j=z;j--;puts(""))
we iterate z times every row of input and put \n each time.

for(i=-1;++i<x*z;putchar(..) )
we put x*z characters.

a=m[i/z]
we use a to save on m[i/z] repetitions which is current input being enlarged.

putchar(( ... )?32:a
... => many nested ternary operators to select proper character based on a and i / j relations which evaluates to 1 or 0 , we then puts a space or a.

C (clang), 170 147 143 bytes

a,j,i;f(m,x,z)char*m;{for(;*m;m+=x)for(j=z;j--;puts(""))for(i=-1;++i<x*z;putchar((a-92?a-47?a-45?a-95|j:j-~j-z:i%z-j:~j+z-i%z)?32:a))a=m[i/z];} 

Try it online!

  • thanks to @ceilingcat suggestion !
  • added for loop instead of recursion

f(m,x,z)char*m;{ function taking:

  • m : char array without newlines
  • x : width
  • z : scale

m+=x;*m&&f(m,x,z); => for(;*m;m+=x)
for every row of input, loop actually better than recursion.

for(j=z;j--;puts(""))
we iterate z times every row of input and put \n each time.

for(i=-1;++i<x*z;putchar(..) )
we put x*z characters.

a=m[i/z]
we use a to save on m[i/z] repetitions which is current input being enlarged.

putchar(( ... )?32:a
... => many nested ternary operators to select proper character based on a and i / j relations which evaluates to 1 or 0 , we then puts a space or a.

C (clang), 170 147 143 137 bytes

a,j,i;f(*m,x,z){for(;*m;m+=x)for(j=z;j--;puts(""))for(i=-1;++i<x*z;putchar((a-92?a-47?a-45?a-95|j:j-~j-z:i%z-j:~j+z-i%z)?32:a))a=m[i/z];} 

Try it online!

  • thanks to @ceilingcat suggestion !
  • added for loop instead of recursion
  • thanks to @Johan du Toit for suggesting using int*array as input!

f(*m,x,z){ function taking:

  • m : char int array without newlines
  • x : width
  • z : scale

m+=x;*m&&f(m,x,z); => for(;*m;m+=x)
for every row of input, loop actually better than recursion.

for(j=z;j--;puts(""))
we iterate z times every row of input and put \n each time.

for(i=-1;++i<x*z;putchar(..) )
we put x*z characters.

a=m[i/z]
we use a to save on m[i/z] repetitions which is current input being enlarged.

putchar(( ... )?32:a
... => many nested ternary operators to select proper character based on a and i / j relations which evaluates to 1 or 0 , we then puts a space or a.

added 5 characters in body
Source Link
AZTECCO
  • 11k
  • 1
  • 17
  • 60

C (clang), 170 147 143 bytes

a,j,i;f(m,x,z)char*m;{for(;*m;m+=x)for(j=z;j--;puts(""))for(i=-1;++i<x*z;putchar((a-92?a-47?a-45?a-95|j:j-~j-z:i%z-j:~j+z-i%z)?32:a))a=m[i/z];} 

Try it online!

  • thanks to @ceilingcat suggestion !
  • added for loop instead of recursion

f(m,x,z)char*m;{ function taking:

  • m : char array without newlines
  • x : width
  • z : scale

m+=x;*m&&f(m,x,z); => for(;*m;m+=x)
for every row of input, loop actually better than recursion.

for(j=z;j--;puts(""))
we iterate z times every row of input and put \n each time.

for(i=-1;++i<x*z;putchar(..) )
we put x*z characters.

a=m[i/z]
we use aa to save on m[i/z] repetitions which is current input being enlarged.

putchar(( ... )?32:a
... => many nested ternary operators to select proper character based on a and i / j relations which evaluates to 1 or 0 , we then puts a space or a

m+=x;*m&&f(m,x,z); => for(;*m;m+=x)
for every row of input was better than recursion.

C (clang), 170 147 143 bytes

a,j,i;f(m,x,z)char*m;{for(;*m;m+=x)for(j=z;j--;puts(""))for(i=-1;++i<x*z;putchar((a-92?a-47?a-45?a-95|j:j-~j-z:i%z-j:~j+z-i%z)?32:a))a=m[i/z];} 

Try it online!

  • thanks to @ceilingcat suggestion !
  • added for loop instead of recursion

f(m,x,z)char*m;{ function taking:

  • m : char array without newlines
  • x : width
  • z : scale

for(j=z;j--;puts(""))
we iterate z times every row of input and put \n each time

i=-1;++i<x*z;putchar(..
we put x*z characters

a=m[i/z]
we use a to save on m[i/z] repetitions which is current input being enlarged

putchar(( ... )?32:a
... => many nested ternary operators to select proper character based on a and i / j relations which evaluates to 1 or 0 , we then puts a space or a

m+=x;*m&&f(m,x,z); => for(;*m;m+=x)
for every row of input was better than recursion

C (clang), 170 147 143 bytes

a,j,i;f(m,x,z)char*m;{for(;*m;m+=x)for(j=z;j--;puts(""))for(i=-1;++i<x*z;putchar((a-92?a-47?a-45?a-95|j:j-~j-z:i%z-j:~j+z-i%z)?32:a))a=m[i/z];} 

Try it online!

  • thanks to @ceilingcat suggestion !
  • added for loop instead of recursion

f(m,x,z)char*m;{ function taking:

  • m : char array without newlines
  • x : width
  • z : scale

m+=x;*m&&f(m,x,z); => for(;*m;m+=x)
for every row of input, loop actually better than recursion.

for(j=z;j--;puts(""))
we iterate z times every row of input and put \n each time.

for(i=-1;++i<x*z;putchar(..) )
we put x*z characters.

a=m[i/z]
we use a to save on m[i/z] repetitions which is current input being enlarged.

putchar(( ... )?32:a
... => many nested ternary operators to select proper character based on a and i / j relations which evaluates to 1 or 0 , we then puts a space or a.

added 5 characters in body
Source Link
AZTECCO
  • 11k
  • 1
  • 17
  • 60

C (clang), 170 147 143 bytes

a,j,i;f(m,x,z)char*m;{for(;*m;m+=x)for(j=z;j--;puts(""))for(i=-1;++i<x*z;putchar((a-92?a-47?a-45?a-95|j:j-~j-z:i%z-j:~j+z-i%z)?32:a))a=m[i/z];} 

Try it online!

  • thanks to @ceilingcat suggestion !
  • added for loop instead of recursion

f(m,x,z)char*m;{ function taking:

  • m : char array without newlines
  • x : width
  • z : scale

for(j=z;j--;puts(""))
we iterate z times every row of input and put \n each time

fori=-1;++i<x*z;putchar(i=0;i< x*z;++i)..
we put x*z characters

a=m[i/z]
we use a to save on m[i/z] repetitions which is current input being enlarged

putchar(( ... )?32:a
many ... => many nested ternary operators to select proper character based on a and i / j relations. which evaluates to 1 or 0 , we then puts a space or a

m+=x;*m&&f(m,x,z); => m+=x;*m&&ffor(m,x,z;*m;m+=x);  
finally we go to nextfor every row of input and if it's not \0 we call f() on itwas better than recursion

C (clang), 170 147 143 bytes

a,j,i;f(m,x,z)char*m;{for(;*m;m+=x)for(j=z;j--;puts(""))for(i=-1;++i<x*z;putchar((a-92?a-47?a-45?a-95|j:j-~j-z:i%z-j:~j+z-i%z)?32:a))a=m[i/z];} 

Try it online!

  • thanks to @ceilingcat suggestion !
  • added for loop instead of recursion

f(m,x,z)char*m;{ function taking:

  • m : char array without newlines
  • x : width
  • z : scale

for(j=z;j--;puts(""))
we iterate z times every row of input and put \n each time

for(i=0;i< x*z;++i)
we put x*z characters

a=m[i/z]
we use a to save on m[i/z] repetitions which is current input being enlarged

putchar(..
many nested ternary operators to select proper character based on a and i / j relations.

m+=x;*m&&f(m,x,z);  
finally we go to next row of input and if it's not \0 we call f() on it

C (clang), 170 147 143 bytes

a,j,i;f(m,x,z)char*m;{for(;*m;m+=x)for(j=z;j--;puts(""))for(i=-1;++i<x*z;putchar((a-92?a-47?a-45?a-95|j:j-~j-z:i%z-j:~j+z-i%z)?32:a))a=m[i/z];} 

Try it online!

  • thanks to @ceilingcat suggestion !
  • added for loop instead of recursion

f(m,x,z)char*m;{ function taking:

  • m : char array without newlines
  • x : width
  • z : scale

for(j=z;j--;puts(""))
we iterate z times every row of input and put \n each time

i=-1;++i<x*z;putchar(..
we put x*z characters

a=m[i/z]
we use a to save on m[i/z] repetitions which is current input being enlarged

putchar(( ... )?32:a
... => many nested ternary operators to select proper character based on a and i / j relations which evaluates to 1 or 0 , we then puts a space or a

m+=x;*m&&f(m,x,z); => for(;*m;m+=x)
for every row of input was better than recursion

added 56 characters in body
Source Link
AZTECCO
  • 11k
  • 1
  • 17
  • 60
Loading
add code blocks and correction
Source Link
Razetime
  • 27.6k
  • 3
  • 31
  • 77
Loading
added 20 characters in body
Source Link
AZTECCO
  • 11k
  • 1
  • 17
  • 60
Loading
Source Link
AZTECCO
  • 11k
  • 1
  • 17
  • 60
Loading