add Greatest Common Factor - Follow Up Deployment
Browse files112 unmodified lines113114115116117118115 unmodified lines23423523623723823946 unmodified lines286287288289290291489 unmodified lines781782783784785786787788789790791792793794112 unmodified lines<button id="ln" class="bg-purple-500 hover:bg-purple-600 text-white text-xl p-3 rounded-lg calculator-btn">ln</button><button id="pi" class="bg-purple-500 hover:bg-purple-600 text-white text-xl p-3 rounded-lg calculator-btn">π</button><button id="factorial" class="bg-purple-500 hover:bg-purple-600 text-white text-xl p-3 rounded-lg calculator-btn">n!</button><!-- Conversion Mode --><button id="convert-mode" class="bg-indigo-500 hover:bg-indigo-600 text-white text-xl p-3 rounded-lg calculator-btn col-span-4">Convert</button>115 unmodified linesconst lnButton = document.getElementById('ln');const piButton = document.getElementById('pi');const factorialButton = document.getElementById('factorial');// InitializeupdateDisplay();46 unmodified lineslnButton.addEventListener('click', () => applyFunction('ln'));piButton.addEventListener('click', appendPi);factorialButton.addEventListener('click', factorial);// Keyboard supportdocument.addEventListener('keydown', handleKeyboardInput);489 unmodified linesappendNumber(e.key);} else if (e.key === '.') {appendDecimal();} else if (e.key === '+') {setOperation('+');} else if (e.key === '-') {setOperation('-');} else if (e.key === '*') {setOperation('×');} else if (e.key === '/') {setOperation('÷');} else if (e.key === '^') {setOperation('^');} else if (e.key === '(') {112 unmodified lines113114115116117118119115 unmodified lines23523623723823924024146 unmodified lines288289290291292293294489 unmodified lines784785786787788789790791792793794795796797798799800801112 unmodified lines<button id="ln" class="bg-purple-500 hover:bg-purple-600 text-white text-xl p-3 rounded-lg calculator-btn">ln</button><button id="pi" class="bg-purple-500 hover:bg-purple-600 text-white text-xl p-3 rounded-lg calculator-btn">π</button><button id="factorial" class="bg-purple-500 hover:bg-purple-600 text-white text-xl p-3 rounded-lg calculator-btn">n!</button><button id="gcd" class="bg-purple-500 hover:bg-purple-600 text-white text-xl p-3 rounded-lg calculator-btn">GCD</button><!-- Conversion Mode --><button id="convert-mode" class="bg-indigo-500 hover:bg-indigo-600 text-white text-xl p-3 rounded-lg calculator-btn col-span-4">Convert</button>115 unmodified linesconst lnButton = document.getElementById('ln');const piButton = document.getElementById('pi');const factorialButton = document.getElementById('factorial');const gcdButton = document.getElementById('gcd');// InitializeupdateDisplay();46 unmodified lineslnButton.addEventListener('click', () => applyFunction('ln'));piButton.addEventListener('click', appendPi);factorialButton.addEventListener('click', factorial);gcdButton.addEventListener('click', () => appendFunction('gcd('));// Keyboard supportdocument.addEventListener('keydown', handleKeyboardInput);489 unmodified linesappendNumber(e.key);} else if (e.key === '.') {appendDecimal();} else if (e.key === '+' || e.key === '-' || e.key === '*' || e.key === '/') {// Check if we're inside parenthesesconst openParens = (currentInput.match(/\(/g) || []).length;const closeParens = (currentInput.match(/\)/g) || []).length;if (openParens > closeParens) {// Inside parentheses - just append the operatorappendValue(e.key === '*' ? '×' : e.key === '/' ? '÷' : e.key);} else {// Not inside parentheses - treat as operationsetOperation(e.key === '*' ? '×' : e.key === '/' ? '÷' : e.key);}} else if (e.key === '^') {setOperation('^');} else if (e.key === '(') {
index.html+15-8