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

Added antilog calculator #2541

Merged
merged 1 commit into from
Jul 27, 2024
Merged
Show file tree
Hide file tree
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
31 changes: 31 additions & 0 deletions Antilog Calculator/index.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
<!DOCTYPE html>
<html lang="en">

<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<link rel="stylesheet" href="style.css">
<title>Anti-Log Calculator</title>
</head>

<body>
<header>
<h1>Anti-Log Calculator</h1>
</header>

<section id="calculator">
<label for="value">Value:</label>
<input type="number" id="value" required>

<label for="base">Base:</label>
<input type="number" id="base" required>

<button onclick="calculate()">Calculate</button>

<p id="result"></p>
</section>

<script src="script.js"></script>
</body>

</html>
12 changes: 12 additions & 0 deletions Antilog Calculator/manifest.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
{
"manifest_version": 3,
"name": "Antilog Calculator",
"version": "1.0",
"description": "A calculator that calculates us the antilog of the value with respect to it's base.",
"action": {
"default_popup": "index.html"
},
"permissions": [
"storage"
]
}
13 changes: 13 additions & 0 deletions Antilog Calculator/script.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
function calculate() {
// Get input values
const value = document.getElementById('value').value;
const base = document.getElementById('base').value;

// Perform the selected calculation
let result;
result = Math.pow(base,value)

// Display the result
const resultElement = document.getElementById('result');
resultElement.textContent = result;
}
67 changes: 67 additions & 0 deletions Antilog Calculator/style.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,67 @@
body {
font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
margin: 0;
padding: 0;
background-color: #aaf0dd;
}

header {
background-color: #3c25e8;
color: #fff;
text-align: center;
padding: 1em;
}

#calculator {
max-width: 300px;
margin: 20px auto;
border: 2px solid #0c0101;
padding: 20px;
border-radius: 8px;
background: linear-gradient(to right, #deec76, #15df0e);
background-color: #fff;
box-shadow: 0 0 10px rgba(0, 0, 0, 200);
}

label {
display: block;
margin-bottom: 8px;
color: #333;
}

input,
select {
width: 100%;
padding: 10px;
margin-bottom: 16px;
box-sizing: border-box;
border-radius: 9px;
}

button {
width: 100%;
height: 40px;
font-size: 16px;
cursor: pointer;
background-color: #103cee;
color: #fff;
border: none;
border-radius: 9px;
transition: background-color 0.3s;
}

button:hover {
background-color: #45a09e;
}

#result {
margin-top: 16px;
font-weight: bold;
color: #333;
}
#base{
font-weight: bold;
}
#value{
font-weight: bold;
}
Loading