![](https://tgfile.tg-static.com/static/web/img/placeholder.gif)
for(boolean b=true;b;System.out.print("*\n**\n***\n****\n***\n**\n*"))b=false;より短くできないか
2014-02-26 23:46:02![](https://tgfile.tg-static.com/static/web/img/placeholder.gif)
for(int i=1;i-->0;System.out.print("*\n**\n***\n****\n***\n**\n*"));で
2014-02-26 23:48:32![](https://tgfile.tg-static.com/static/web/img/placeholder.gif)
class h{public static void main(String[] a){for(int i=7;i>0;System.out.println("****".substring(Math.abs(4-i--))));}}よりは3文字削れた
2014-02-26 23:50:17ideone: http://ideone.com/NwycAc
コードゴルフの熱は冷めやらぬままバッチファイルにまで飛び火。
![](https://tgfile.tg-static.com/static/web/img/placeholder.gif)
バッチファイル @echo off set a=****&for %%i in (1 2 3 4 3 2 1)do call echo %%a:~0,%%i%%
2014-02-26 23:51:30![](https://tgfile.tg-static.com/static/web/img/placeholder.gif)
ちなみに set a=****&for %%i in (3 2 1 0 1 2 3)do call echo %%a:~%%i%% とやったほうが短かったです
2014-02-27 00:26:34Perlもやってみました。
ideone: http://ideone.com/FfGUQ9
そしてPHPへ。
![](https://tgfile.tg-static.com/static/web/img/placeholder.gif)
PHP編。以下の52bytesより削ろう <?php for(print("*\n**\n***\n****\n***\n**\n*");0;);
2014-02-26 23:55:33![](https://tgfile.tg-static.com/static/web/img/placeholder.gif)
for(print "*\n**\n***\n****\n***\n**\n*";0;); for($n=8;--$n>0;print str_repeat("*",$n>4?8-$n:$n)."\n"); ぐへぇ
2014-02-27 00:11:38![](https://tgfile.tg-static.com/static/web/img/placeholder.gif)
前より2文字縮めたけどぐぬぬ for($n=4;--$n>-4;print str_repeat("*",4-abs($n))."\n"); for(echo "*\n**\n***\n****\n***\n**\n*";0;);
2014-02-27 00:28:04