1
0
Files
web-programming/Лаб8/Сайт/index.html
2024-05-23 22:43:00 +03:00

57 lines
1.9 KiB
HTML

<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Комплексные числа</title>
<script src="base.js" defer></script>
<script src="complex.js" defer></script>
<script src="main.js" defer></script>
<style>
body {
font-family: Arial, sans-serif;
margin: 20px;
}
.complex-number {
margin-bottom: 20px;
}
</style>
</head>
<body>
<h1>Комплексные числа</h1>
<div>
<h2>Создать комплексное число</h2>
<label for="real-part">Действительная часть:</label>
<input type="number" id="real-part" step="any">
<label for="imaginary-part">Мнимая часть:</label>
<input type="number" id="imaginary-part" step="any">
<button onclick="createComplexNumber()">Создать</button>
</div>
<h2>Список комплексных чисел</h2>
<div id="complex-numbers"></div>
<div>
<h2>Произвести действие над комплексным числом</h2>
<div>
<label for="first-complex">Первое комплексное число:</label>
<select id="first-complex"></select>
<label for="second-complex">Второе комплексное число:</label>
<select id="second-complex"></select>
</div>
<button onclick="performOperation('add')">Сложить</button>
<button onclick="performOperation('subtract')">Вычесть</button>
<button onclick="performOperation('multiply')">Умножить</button>
<button onclick="performOperation('divide')">Разделить</button>
</div>
<h2>Лог действий</h2>
<pre id="actions-log"></pre>
</body>
</html>