<%
For i = 1 To 10
For j = 5 < i to 5 step -1
response.write(" ")
Next
for k = 0 < i to 10
response.write("*")
Next
response.write("</br>")
Next
%>
在我的代码上方使用asp经典创建星号金字塔。结果如下:
如何使解决方案在下面创建星号金字塔:
答案 0 :(得分:0)
<%
For i = 1 To 10
For j = 1 to i
response.write(j)
Next
for k = 0 < i to 10
response.write(" ")
Next
response.write("</br>")
Next
%>
答案 1 :(得分:0)
<%
For i = 1 To 10
For j = 1 to i
response.write(j)
Next
for k = i to 10 '<-- fill the rest of the blanks
response.write(" ")
Next
response.write("</br>")
Next
%>