SHARE
TWEET

Untitled

a guest Sep 13th, 2017 62 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. <!DOCTYPE html>
  2. <html>
  3. <head>
  4.     <title>Методы alert(), confirm() и prompt()</title>
  5.     <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
  6. </head>
  7. <body>
  8.     <script type="text/javascript">
  9.      var sum=0;
  10.  
  11.         var x = Number(prompt("Введите x1 целое число>0"));
  12.         var y = Number(prompt("Введите y1 число>0"));
  13.     for (var i = x; i <= y; i++)
  14.         {
  15.             sum= sum + i;
  16.         }
  17.         alert(sum);    
  18.     </script>
  19. </body>
  20. </html>
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top