Saturday, March 29, 2014

Tutorial 11

Question 1-I
<html>
    <body>

    <script type="text/javascript">
        
        var count=prompt("Input your character");
    
        for ( i=0 ;  i<=10 ; i++) 
                document.write (count); 
                
   </script>
    </body>
</html>



Question 1-II

<html>
    <body>

    <script type="text/javascript">
 
    var i=0;
    var count1=prompt("Input your character");
    var count2=prompt("Input your character");
    
    
    while (i<=5) {
        document.write (count1);
        document.write (count2);
        i++;
    }
    </script>
    </body>
</html>
    
Question 1- III

<html>
    <body>

    <script type="text/javascript">

        var count1=prompt("Input your integer");

        for (var i=1 ; i<=12 ; i++)
            document.write(count1+" x "+i+" = " + (count1*i) + "<br>"); 

    </script>
    </body>
</html>

No comments:

Post a Comment