Advertisement
RokiAdhytama

Sum - Chapter 9

Jul 3rd, 2022
743
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. <html xmlns = "http://www.w3.org/1999/xhtml">
  2.    <head>
  3.       <title>Sum the Even Integers from 2 to 100</title>
  4.  
  5.       <script type = "text/javascript">
  6.          <!--
  7.          var sum = 0;
  8.  
  9.          for ( var number = 2; number <= 100; number += 2 )
  10.             sum += number;
  11.  
  12.          document.writeln( "The sum of the even integers " +
  13.             "from 2 to 100 is " + sum );
  14.          // -->
  15.       </script>
  16.  
  17.    </head><body></body>
  18. </html>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement