From de98a7b07436bffbc828f2302995868e1b8fa0fb Mon Sep 17 00:00:00 2001
From: wali91 <53268679+wali91@users.noreply.github.com>
Date: Wed, 27 Nov 2019 17:24:23 +0700
Subject: [PATCH 1/3] membuat calculator di html
---
index.html | 43 ++++++++++++++++++++++++++++++++++++++++---
1 file changed, 40 insertions(+), 3 deletions(-)
diff --git a/index.html b/index.html
index b7becba..3a43bfa 100644
--- a/index.html
+++ b/index.html
@@ -2,10 +2,47 @@
Exercise 2
+
-
- Kalkulator
-
+
+
From b711bb87c4b1a21729f1e9cd5ce33540c34c31d7 Mon Sep 17 00:00:00 2001
From: wali91 <53268679+wali91@users.noreply.github.com>
Date: Wed, 27 Nov 2019 17:27:02 +0700
Subject: [PATCH 2/3] menambahkan file calculator.js
---
calculator.js | 20 ++++++++++++++++++++
1 file changed, 20 insertions(+)
create mode 100644 calculator.js
diff --git a/calculator.js b/calculator.js
new file mode 100644
index 0000000..1cd1a15
--- /dev/null
+++ b/calculator.js
@@ -0,0 +1,20 @@
+var display = document.formNilai.formTeks;
+function btn(num)
+{
+ display.value += num;
+}
+
+function hitung()
+{
+ display.value = eval(display.value);
+}
+
+function bcksp()
+{
+ display.value = display.value.substr(0,display.value.length-1);
+}
+
+function clr()
+{
+ display.value ="";
+}
From 3f69fb5c5715d2af8397d7e2eec583839200fd17 Mon Sep 17 00:00:00 2001
From: wali91 <53268679+wali91@users.noreply.github.com>
Date: Wed, 27 Nov 2019 17:28:07 +0700
Subject: [PATCH 3/3] menambahkan file css untuk calculator html
---
style.css | 49 +++++++++++++++++++++++++++++++++++++++++++++++++
1 file changed, 49 insertions(+)
create mode 100644 style.css
diff --git a/style.css b/style.css
new file mode 100644
index 0000000..6ea1d96
--- /dev/null
+++ b/style.css
@@ -0,0 +1,49 @@
+* {
+ margin: 0;
+ padding: 0;
+ }
+.priority
+{
+ background-color:yellowgreen;
+ position: absolute;
+ padding: 10px;
+ top: 50%;
+ left: 50%;
+ transform: translate(-50%,-50%);
+ border-radius: 5px;
+ box-shadow: 5px 4px 5px #A5A5A5FF;
+}
+h2
+{
+ text-align: center;
+ font-family: sans-serif;
+}
+table
+{
+ width: 100%;
+}
+form input
+{
+ font-size: 22px;
+ margin: 5px;
+ padding: 5px;
+ height: 66px;
+ text-align: right;
+}
+table td input
+{
+ width : 100%;
+ background-color :burlywood;
+ padding : 5px;
+ font-size : 22px;
+ cursor : pointer;
+ border : 2px solid #000;
+}
+table td input:hover
+{
+ border : 2px solid #DAA67BFF;
+}
+body
+{
+ background-color: blueviolet;
+}