string strOp = string.Empty;
int j=5;
for (int i = 1; i <= j; i++)
{
strOp += i.ToString() + " ";
if (i == j)
{
j = j - 1;
i = 0;
strOp += "<br/>";
}
}
int j=5;
for (int i = 1; i <= j; i++)
{
strOp += i.ToString() + " ";
if (i == j)
{
j = j - 1;
i = 0;
strOp += "<br/>";
}
}
Response.Write(strOp);
Output :
1 2 3 4 5
1 2 3 4
1 2 3
1 2
1
No comments:
Post a Comment
Comments