Spaces:
Running
Running
on gst, unit conversion, trigonometry. metrix output Display sceen is coming down only basic and Scientific calculator output is coming correctly over the screen or lets say display.
Browse files- index.html +9 -11
index.html
CHANGED
|
@@ -162,15 +162,15 @@
|
|
| 162 |
<div class="bg-gray-100 rounded-xl p-4">
|
| 163 |
<div class="flex justify-between mb-2">
|
| 164 |
<span>Net Amount:</span>
|
| 165 |
-
<span id="netAmount">₹0.00</span>
|
| 166 |
</div>
|
| 167 |
<div class="flex justify-between mb-2">
|
| 168 |
<span>GST Amount:</span>
|
| 169 |
-
<span id="gstResult">₹0.00</span>
|
| 170 |
</div>
|
| 171 |
<div class="flex justify-between font-bold text-lg">
|
| 172 |
<span>Total Amount:</span>
|
| 173 |
-
<span id="totalAmount">₹0.00</span>
|
| 174 |
</div>
|
| 175 |
</div>
|
| 176 |
</div>
|
|
@@ -282,7 +282,7 @@
|
|
| 282 |
</div>
|
| 283 |
</div>
|
| 284 |
</div>
|
| 285 |
-
|
| 286 |
<div id="scientificCalculator" class="hidden">
|
| 287 |
<div class="result-display">
|
| 288 |
<div class="grid grid-cols-5 gap-2 mb-4">
|
|
@@ -472,7 +472,7 @@
|
|
| 472 |
document.getElementById('gstResult').textContent = '₹0.00';
|
| 473 |
document.getElementById('totalAmount').textContent = '₹0.00';
|
| 474 |
}
|
| 475 |
-
|
| 476 |
function convertUnits() {
|
| 477 |
const fromUnit = document.getElementById('fromUnit').value;
|
| 478 |
const toUnit = document.getElementById('toUnit').value;
|
|
@@ -502,7 +502,7 @@
|
|
| 502 |
document.getElementById('unitValue').value = '1';
|
| 503 |
document.getElementById('unitResult').textContent = '1 cm = 0.01 m';
|
| 504 |
}
|
| 505 |
-
|
| 506 |
function calculateTrig() {
|
| 507 |
const angle = parseFloat(document.getElementById('trigAngle').value) || 0;
|
| 508 |
const func = document.getElementById('trigFunction').value;
|
|
@@ -543,7 +543,7 @@
|
|
| 543 |
document.getElementById('trigAngle').value = '45';
|
| 544 |
document.getElementById('trigResult').textContent = 'sin(45°) = 0.7071';
|
| 545 |
}
|
| 546 |
-
|
| 547 |
function generateMatrixInputs(size) {
|
| 548 |
const container = document.getElementById('matrixInputs');
|
| 549 |
container.innerHTML = '';
|
|
@@ -668,9 +668,8 @@
|
|
| 668 |
const adjugate = transposeMatrix(cofactor);
|
| 669 |
return adjugate.map(row => row.map(val => val/det));
|
| 670 |
}
|
| 671 |
-
|
| 672 |
function displayMatrixResult(matrix, operation) {
|
| 673 |
-
let html = `<div class="text-center mb-2">${operation}:</div>`;
|
| 674 |
html += '<div class="grid gap-1 justify-center" style="grid-template-columns: repeat(' + matrix[0].length + ', auto);">';
|
| 675 |
|
| 676 |
for (let i = 0; i < matrix.length; i++) {
|
|
@@ -682,8 +681,7 @@
|
|
| 682 |
html += '</div>';
|
| 683 |
document.getElementById('matrixResult').innerHTML = html;
|
| 684 |
}
|
| 685 |
-
|
| 686 |
-
function clearMatrix() {
|
| 687 |
const size = parseInt(document.getElementById('matrixSize').value);
|
| 688 |
for (let i = 0; i < size; i++) {
|
| 689 |
for (let j = 0; j < size; j++) {
|
|
|
|
| 162 |
<div class="bg-gray-100 rounded-xl p-4">
|
| 163 |
<div class="flex justify-between mb-2">
|
| 164 |
<span>Net Amount:</span>
|
| 165 |
+
<span id="netAmount" class="font-bold">₹0.00</span>
|
| 166 |
</div>
|
| 167 |
<div class="flex justify-between mb-2">
|
| 168 |
<span>GST Amount:</span>
|
| 169 |
+
<span id="gstResult" class="font-bold">₹0.00</span>
|
| 170 |
</div>
|
| 171 |
<div class="flex justify-between font-bold text-lg">
|
| 172 |
<span>Total Amount:</span>
|
| 173 |
+
<span id="totalAmount" class="font-bold">₹0.00</span>
|
| 174 |
</div>
|
| 175 |
</div>
|
| 176 |
</div>
|
|
|
|
| 282 |
</div>
|
| 283 |
</div>
|
| 284 |
</div>
|
| 285 |
+
<!-- Scientific Calculator -->
|
| 286 |
<div id="scientificCalculator" class="hidden">
|
| 287 |
<div class="result-display">
|
| 288 |
<div class="grid grid-cols-5 gap-2 mb-4">
|
|
|
|
| 472 |
document.getElementById('gstResult').textContent = '₹0.00';
|
| 473 |
document.getElementById('totalAmount').textContent = '₹0.00';
|
| 474 |
}
|
| 475 |
+
// Unit Conversion
|
| 476 |
function convertUnits() {
|
| 477 |
const fromUnit = document.getElementById('fromUnit').value;
|
| 478 |
const toUnit = document.getElementById('toUnit').value;
|
|
|
|
| 502 |
document.getElementById('unitValue').value = '1';
|
| 503 |
document.getElementById('unitResult').textContent = '1 cm = 0.01 m';
|
| 504 |
}
|
| 505 |
+
// Trigonometry
|
| 506 |
function calculateTrig() {
|
| 507 |
const angle = parseFloat(document.getElementById('trigAngle').value) || 0;
|
| 508 |
const func = document.getElementById('trigFunction').value;
|
|
|
|
| 543 |
document.getElementById('trigAngle').value = '45';
|
| 544 |
document.getElementById('trigResult').textContent = 'sin(45°) = 0.7071';
|
| 545 |
}
|
| 546 |
+
// Matrix Calculator
|
| 547 |
function generateMatrixInputs(size) {
|
| 548 |
const container = document.getElementById('matrixInputs');
|
| 549 |
container.innerHTML = '';
|
|
|
|
| 668 |
const adjugate = transposeMatrix(cofactor);
|
| 669 |
return adjugate.map(row => row.map(val => val/det));
|
| 670 |
}
|
|
|
|
| 671 |
function displayMatrixResult(matrix, operation) {
|
| 672 |
+
let html = `<div class="text-center mb-2 font-bold">${operation}:</div>`;
|
| 673 |
html += '<div class="grid gap-1 justify-center" style="grid-template-columns: repeat(' + matrix[0].length + ', auto);">';
|
| 674 |
|
| 675 |
for (let i = 0; i < matrix.length; i++) {
|
|
|
|
| 681 |
html += '</div>';
|
| 682 |
document.getElementById('matrixResult').innerHTML = html;
|
| 683 |
}
|
| 684 |
+
function clearMatrix() {
|
|
|
|
| 685 |
const size = parseInt(document.getElementById('matrixSize').value);
|
| 686 |
for (let i = 0; i < size; i++) {
|
| 687 |
for (let j = 0; j < size; j++) {
|