Loading ...
Sorry, an error occurred while loading the content.

File - Sum and Product.html

Expand Messages
  • ibi_edu@yahoogroups.com
    var No = prompt ( How many Numbers You want to sum and product : , ); Num = new Array(No); var i=0; var Sum=0;
    Message 1 of 138 , Dec 23, 2012
    View Source
    • 0 Attachment
      <html>
      <head>
      <script language="javascript">
      var No = prompt ("How many Numbers You want to sum and product : ","");
      Num = new Array(No);
      var i=0;
      var Sum=0;
      var Pro=1;
      for( i=1 ; i<=No ; i++ )
      {
      Num[i] = prompt ("Enter the value of " + i + "","");
      Sum = parseInt (Num[i]) + Sum;
      Pro = parseInt (Num[i]) * Pro;
      }
      document.write("The Total Sum Of " + (i-1) + " Values : " , Sum + "<br>");

      document.write("The Total Product Of " + (i-1) + " Values : " , Pro);

      </script>
      <body bgcolor="#9966FF">
      </body>
      </head>
      </html>
    • ibi_edu@yahoogroups.com
      var No = prompt ( How many Numbers You want to sum and product : , ); Num = new Array(No); var i=0; var Sum=0;
      Message 138 of 138 , Apr 13 2:38 AM
      View Source
      • 0 Attachment
        <html>
        <head>
        <script language="javascript">
        var No = prompt ("How many Numbers You want to sum and product : ","");
        Num = new Array(No);
        var i=0;
        var Sum=0;
        var Pro=1;
        for( i=1 ; i<=No ; i++ )
        {
        Num[i] = prompt ("Enter the value of " + i + "","");
        Sum = parseInt (Num[i]) + Sum;
        Pro = parseInt (Num[i]) * Pro;
        }
        document.write("The Total Sum Of " + (i-1) + " Values : " , Sum + "<br>");

        document.write("The Total Product Of " + (i-1) + " Values : " , Pro);

        </script>
        <body bgcolor="#9966FF">
        </body>
        </head>
        </html>
      Your message has been successfully submitted and would be delivered to recipients shortly.