Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Inverse #24

Open
wants to merge 3 commits into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
17 changes: 16 additions & 1 deletion calculator.html
Original file line number Diff line number Diff line change
Expand Up @@ -2,16 +2,31 @@
<title>Calculator</title><meta charset="utf-8">
<script type="text/javascript">

function square() {
<<<<<<< HEAD
function inverse() {
var num = document.getElementById("n1");
num.value = 1/num.value;
=======
function square() {
var num = document.getElementById("n2");
num.value = num.value * num.value;
>>>>>>> master
}
</script>
</head>
<body>
<<<<<<< HEAD
Number:
<input type="text" id="n1"><p>

<button onclick="inverse()"> 1/x </button>
=======

<h1>Jose Alejandro Sanchez</h1>
Number:
<input type="text" id="n2"><p>

<button onclick="square()"> x<sup>2</sup> </button>
>>>>>>> master
</body>
</html>