You want to repot your frangipani and have now bought a larger (or several) flower pot. Now the question is, how much soil (in liters) will fit in my flower pot? While we all studied math at some point, very few of us remember the formula for calculating the volume, so we’re here to help! How much soil do you need to buy? Calculate it yourself quickly! „` To calculate the volume of your flower pot, please enter the following measurements: 1.) Diameter of the pot at the opening document.addEventListener(‚DOMContentLoaded‘, function () {How much soil fits in my flower pots?
2.) Diameter of the pot at the base
3.) Height of the pot
4.) Number of pots
Please enter the measurements in centimeters.
const wrapper = document.querySelector(‚.pot-volume-calculator‘);
if (!wrapper) return;
const heightInput = wrapper.querySelector(‚#potHeight‘);
const topInput = wrapper.querySelector(‚#topDiameter‘);
const bottomInput = wrapper.querySelector(‚#bottomDiameter‘);
const button = wrapper.querySelector(‚#calculatePotVolume‘);
const resultEl = document.getElementById(‚result‘);
if (!heightInput || !topInput || !bottomInput || !button || !resultEl) return;
button.addEventListener(‚click‘, function () {
const height = parseFloat(heightInput.value);
const topDiameter = parseFloat(topInput.value);
const bottomDiameter = parseFloat(bottomInput.value);
if (
isNaN(height) || height <= 0 ||
isNaN(topDiameter) || topDiameter <= 0 ||
isNaN(bottomDiameter) || bottomDiameter <= 0
) {
resultEl.textContent = ‚Please enter valid values.‘;
return;
}
const R = topDiameter / 2;
const r = bottomDiameter / 2;
const volumeCm3 = (Math.PI * height * (R * R + R * r + r * r)) / 3;
const volumeLiters = volumeCm3 / 1000;
resultEl.textContent = volumeLiters.toFixed(2) + ‚ Liters‘;
});
});
Connectez-vous avec votre adresse e-mail et votre mot de passe pour gérer vos commandes.
Nous vous avons envoyé un code de sécurité à 6 chiffres par e-mail.
Au moins 10 caractères, comprenant des lettres majuscules et minuscules, des chiffres et des caractères spéciaux.
La connexion au serveur est effectuée
Créez votre compte client dès maintenant : suivez vos commandes et bénéficiez d’un paiement plus rapide.
Ne fermez pas cette fenêtre !
Consultez votre messagerie et collez ici le code à 6 chiffres.
L'inscription est en cours de traitement…