aboutsummaryrefslogtreecommitdiffstats
path: root/csci4131/lec/Lec6Ex1.html
diff options
context:
space:
mode:
authorRossTheRoss <mstrapp@protonmail.com>2021-05-16 21:38:59 -0500
committerRossTheRoss <mstrapp@protonmail.com>2021-05-16 21:38:59 -0500
commit9148fa6e2fad9d54e3451a4478e03f55f0a9fa3c (patch)
tree9e739b11361f5fd122b31cfce107947502b69809 /csci4131/lec/Lec6Ex1.html
parentAdd trash (diff)
downloadhomework-9148fa6e2fad9d54e3451a4478e03f55f0a9fa3c.tar
homework-9148fa6e2fad9d54e3451a4478e03f55f0a9fa3c.tar.gz
homework-9148fa6e2fad9d54e3451a4478e03f55f0a9fa3c.tar.bz2
homework-9148fa6e2fad9d54e3451a4478e03f55f0a9fa3c.tar.lz
homework-9148fa6e2fad9d54e3451a4478e03f55f0a9fa3c.tar.xz
homework-9148fa6e2fad9d54e3451a4478e03f55f0a9fa3c.tar.zst
homework-9148fa6e2fad9d54e3451a4478e03f55f0a9fa3c.zip
Rearrange files
Diffstat (limited to 'csci4131/lec/Lec6Ex1.html')
-rw-r--r--csci4131/lec/Lec6Ex1.html39
1 files changed, 0 insertions, 39 deletions
diff --git a/csci4131/lec/Lec6Ex1.html b/csci4131/lec/Lec6Ex1.html
deleted file mode 100644
index 7b45e18..0000000
--- a/csci4131/lec/Lec6Ex1.html
+++ /dev/null
@@ -1,39 +0,0 @@
-<!DOCTYPE html>
-
-<!-- Addition script. -->
-<html>
-
-<head>
- <meta charset="utf-8">
- <title>Add and Multiply Program</title>
- <script>
-
-
- var number1; // first number to add
- var number2; // second number to add
- var sum; // sum of number1 and number2
- var product; // product of number1 and number2
-
- // read in first number from user as a string, use the window object’s prompt method
- // The window object is a global object - all methods and properties that are not part of another object are part of the window object
-
- number1 = window.prompt("Enter first integer");
- // read in second number from user as a string – note you can omit the object name and dot operator
- // when referring to properties or attributes of the window object because it is global
-
- number2 = window.prompt("Enter second integer");
-
- number1 = parseInt(number1);
- number2 = parseInt(number2);
- sum = parseInt(number1) + parseInt(number2); // add the numbers
- product = number1 * number2; //multiply the numbers
-
- // display the results – uses the document object, highest object in the DOM structure. You have to use object name and dot operator.
- document.writeln("<h1>The program returns " + sum + " as the sum, and</h1>");
- document.writeln("<h1>" + product + " as the product</h1>");
- </script>
-</head>
-
-<body></body>
-
-</html> \ No newline at end of file