jsp输出金字塔的简单实例
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 %>
以上就是小编为大家带来的jsp输出金字塔的简单实例全部内容了,希望大家多多支持CodeAE代码之家~
https://www.uoften.com/program/jsp/20180413/47987.html
页:
[1]