This commit is contained in:
Philippe Torrel
2026-06-17 10:03:52 +02:00
parent bc36251c36
commit f39de9f3b4
7 changed files with 177 additions and 0 deletions

View File

@@ -0,0 +1,69 @@
<!doctype html>
<html lang="de">
<head>
<meta charset="UTF-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>Übung 6: Nur ein bisschen rechnen …</title>
<link href="https://cdn.jsdelivr.net/npm/bootstrap@5.3.8/dist/css/bootstrap.min.css" rel="stylesheet" />
</head>
<body>
<main>
<div class="container py-5">
<div class="alert alert-primary">
<h1>Übung 6: Nur ein bisschen rechnen …</h1>
<table class="table table-striped">
<thead class="table-dark">
<tr>
<th>Ausdruck</th>
<th>Rückgabewert</th>
</tr>
</thead>
<tbody>
<tr>
<td>3 + 4</td>
<td id="rech1"></td>
</tr>
<tr>
<td>3 * 12</td>
<td id="rech2"></td>
</tr>
<tr>
<td>25 + 12</td>
<td id="rech3"></td>
</tr>
<tr>
<td>(12 - 3) / 3</td>
<td id="rech4"></td>
</tr>
<tr>
<td>12 % 3</td>
<td id="rech5"></td>
</tr>
<tr>
<td>12 * (44 / 11) / 3 + 67</td>
<td id="rech6"></td>
</tr>
</tbody>
</table>
</div>
</div>
</main>
<script>
'use strict';
let rech1 = 3 + 4;
let rech2 = 3 * 12;
let rech3 = 25 + 12;
let rech4 = (12 - 3) / 3;
let rech5 = 12 % 3;
let rech6 = (12 * (44 / 11)) / 3 + 67;
document.getElementById('rech1').innerHTML = rech1;
document.getElementById('rech2').innerHTML = rech2;
document.getElementById('rech3').innerHTML = rech3;
document.getElementById('rech4').innerHTML = rech4;
document.getElementById('rech5').innerHTML = rech5;
document.getElementById('rech6').innerHTML = rech6;
</script>
</body>
</html>