Last active
February 22, 2017 05:00
-
-
Save potato4d/8a313a1ea7631929193c1bcf1a9d65d6 to your computer and use it in GitHub Desktop.
RADWIMPSで学ぶ再帰関数 「(前)\1{1,}世」から探し始めよう ref: http://qiita.com/potato4d/items/e3905927670787b34946
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
function prev_life($count){ | |
$life = ""; | |
for ($i=0; $i < $count; $i++) { | |
$life .= "前"; | |
} | |
return $life; | |
} | |
echo "君の" . prev_life(3) . "世から僕は\n"; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function recursive(){ | |
return recursive(); | |
} | |
recursive(); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment