<!DOCTYPE html>
<html lang="fr">
<head>
<meta charset="UTF-8">
<title>Calculatrice</title>
<style>
body {
font-family: Arial, sans-serif;
background: #f0f0f0;
text-align: center;
margin-top: 50px;
}
.calculator {
display: inline-block;
padding: 20px;
background: white;
border-radius: 10px;
box-shadow: 0 0 10px rgba(0,0,0,0.1);
}
input[type="text"] {
width: 100%;
font-size: 2em;
padding: 10px;
margin-bottom: 10px;
text-align: right;
}
.buttons button {
width: 70px;
height: 70px;
font-size: 1.5em;
margin: 5px;
}
</style>
</head>
<body>
<h1>Ma Calculatrice</h1>
<div class="calculator">
<input type="text" id="display" disabled>
<div class="buttons">
<button onclick="press('7')">7</button>
<button onclick="press('8')">8</button>
<button onclick="press('9')">9</button>
<button onclick="press('/')">÷</button><br>
<button onclick="press('4')">4</button>
<button onclick="press('5')">5</button>
<button onclick="press('6')">6</button>
<button onclick="press('*')">×</button><br>
<button onclick="press('1')">1</button>
<button onclick="press('2')">2</button>
<button onclick="press('3')">3</button>
<button onclick="press('-')">−</button><br>
<button onclick="press('0')">0</button>
<button onclick="press('.')">.</button>
<button onclick="calculate()">=</button>
<button onclick="press('+')">+</button><br>
<button onclick="clearDisplay()" style="width: 100%">C</button>
</div>
</div>
<script>
let display = document.getElementById('display');
function press(value) {
display.value += value;
}
function calculate() {
try {
display.value = eval(display.value);
} catch {
display.value = "Erreur";
}
}
function clearDisplay() {
display.value = '';
}
</script>
</body>
</html>
- معلم: ABELKARIM LA

This 3rd grade English course can help both teachers and parents introduce their students to the beauty and power of the English language.
- معلم: John Smith