View Complete Thread | FoxWeb Forum Home
Search:
Date:    Msg ID:   
From:    Thread:   
Subject:   
There are probably more efficient ways of doing this but here's the quickie answer:

<%
finish = 5    &&-- "n" in your question
lc1 = 0       &&-- loop control 1 (outer loop)
lc2 = 0       &&-- loop control 2 (inner loop)
output = ""   &&-- HTML stream
for lc1 = 1 to finish
  for lc2 = 1 to lc1
    output = output + "*"
    next
  output = output + "<br>"
  next
%>

<body>
<%=output%>
</body>

Sent by Hokgiarto Saliem on 11/24/2001 06:24:40 PM:
How to make star ('*') in foxpro with input n.

Exc. n=5
     *
    **
   ***
  ****
*****
Thank you.