Skip to main content
We’ve updated our Terms of Service. A new AI Addendum clarifies how Stack Overflow utilizes AI interactions.
Code Golf

Return to Answer

added 2 characters in body
Source Link
Dan D.
  • 151
  • 1
  • 5

PHP, 10988 bytes

<?php function f($s){$i=-1;while
for(++$i<strlen;$i<strlen($s$s=$argv[1]);){for($j=ord($s[$i]$s[$i++])+1;echo "\n";while(--$j>=97;$j>96;){echo chr($j--);}};echo"
";}

Try it online! Try it online!

Thanks to Shaggy for -21 bytes! :)

PHP, 109 bytes

<?php function f($s){$i=-1;while(++$i<strlen($s)){$j=ord($s[$i])+1;echo "\n";while(--$j>=97){echo chr($j);}}}

Try it online!

PHP, 88 bytes

<?php
for(;$i<strlen($s=$argv[1]);){for($j=ord($s[$i++]);$j>96;)echo chr($j--);echo"
";}

Try it online!

Thanks to Shaggy for -21 bytes! :)

Source Link
Dan D.
  • 151
  • 1
  • 5

PHP, 109 bytes

<?php function f($s){$i=-1;while(++$i<strlen($s)){$j=ord($s[$i])+1;echo "\n";while(--$j>=97){echo chr($j);}}}

Try it online!

AltStyle によって変換されたページ (->オリジナル) /