57 lines
2.0 KiB
HTML
57 lines
2.0 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>
|
||
|
||
<h3>Выбранное комплексное число</h3>
|
||
<div id="selected-complex">Не выбрано</div>
|
||
|
||
<div>
|
||
<h2>Произвести действие над комплексным числом</h2>
|
||
<label for="real-part-op">Действительная часть:</label>
|
||
<input type="number" id="real-part-op" step="any">
|
||
<label for="imaginary-part-op">Мнимая часть:</label>
|
||
<input type="number" id="imaginary-part-op" step="any">
|
||
<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> |