jsp输出金字塔的简单实例
<% String str = ""; for(int i = 1; i <= 5; i++){ for(int j = 1; j <= 5-i; j++){ str +=" "; } for(int k = 1; k <= 2*i-1; k++){ str +="☆"; } str +="<br>"; } %> <%= str %>
本文来自网络收集,不代表计算机技术网立场,如涉及侵权请联系管理员删除。
ctvol管理联系方式QQ:251552304
本文章地址:https://www.ctvol.com/jspttutorial/111954.html