Forum : About the asignment I submitted "Loop assignment"
Brief description  about Online courses   join in Online courses
View ashish  sinha 's Profile

About the asignment I submitted "Loop assignment"

I had got the output for the same "function six( )" the display of the numbers, but donno what happened later with the same function it stopped working, could you please check. I have been unable to solve it and rather got frustrated :(
Asked by ashish sinha | Oct 1, 2010 |  Reply now
Replies (2)
View ashish sinha 's Profile
function six()
{
x=document.form1.txt4.value;

for(i=0;i<2x;i++)
{
while(i<x)
{
for(j=1;j<=i;j++)
document.write(j+ "&nbsp;&nbsp;");
document.write("<br/>");
}
}
for(i=x;i>0;i--)
{
for(j=1;j<=i;j++)
document.write(j+ "&nbsp;&nbsp;");
document.write("<br/>");

}

}
Oct 6, 2010
View teacher siliconindia 's Profile
Hi Asish,

send me a code.
Oct 4, 2010