Computer Science, asked by misty16, 1 year ago

Please help me with this question

Attachments:

misty16: what is that
misty16: it's fine.. you took a lot of trouble to get this..
misty16: really
misty16: i dont require it as i have no time for this stuffs
misty16: no sorry

Answers

Answered by Anonymous
1

Hi,

<!DOCTYPE html>

<html lang="en">

<head>

   <meta charset="UTF-8">

   <title>Asterisk Rows Printer</title>

</head>

<body>

   <script>

       var howManyRows = parseInt(prompt('How many rows you want?'));

       var currentRow = '';


       for (var i = 0; i <= howManyRows; i++) {

         for (var j = 0; j < i; j++) {

             currentRow += "*";

         }

         currentRow += "<br>";

       };


       document.write(currentRow);

   </script>

</body>

</html>

All you have to do is just copy this code and paste in notepad.. then save it as .html and then open it n web browser....

Attachments:

misty16: no i sent the smileys
misty16: sorry if it came in different way
misty16: fine then
misty16: 10
misty16: why do you want?
misty16: actually it starts from class 10
Similar questions