Authour:I will teach you courses online
C Language | C++ | Asp.net | VB.net | Oracle | Hardware and Networking | MCSE |
Contact: | Name: Shrinivas | Mobileno:9703619391 | E-mail: vas.shrinivas002@gmail.com |
1 1 1 1 1
1 1 1 1 1
1 1 1 1 1
1 1 1 1 1
1 1 1 1 1
Story:
Few days back in our house we have celebrated our brother birthday.
My uncle instructed their are 5 steps are their, Arrange 5 chairs in each step.
He Expected 20 people today.
We arranged neatly came out, See below how we arranged.
Details explanation:
Step one-1 1 1 1 1--------five chairs
Step two-1 1 1 1 1--------five chairs
Step three-1 1 1 1 1--------five chairs
Step four-1 1 1 1 1--------five chairs
Step five-1 1 1 1 1-------five chairs
HEAR IS CODE
START COPY FROM BELOW IN NOTEPAD AND RUN IT BEFORE RUN SAVE AS HTM FILE
<html>
<body>
<script type="text/javascript">
var steps,chairs;
for(steps=1;steps<=5;steps++)
{
for(chairs=1;chairs<=5;chairs++)
{
document.write(" 1 ");
}
document.write("<BR>");
}
</script>
</body>
<html>
------------------------- COPY END HEAR ----------------------------------
Continue with next post
http://javascriptwithshrinivas.blogspot.com/2013/07/more-on-logic-using-for-loop.html
No comments:
Post a Comment