-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathmatrix.html
More file actions
94 lines (89 loc) · 2.54 KB
/
matrix.html
File metadata and controls
94 lines (89 loc) · 2.54 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Matrix Addition</title>
<style>
body {
font-family: 'Verdana', sans-serif;
background-color: #eef2f3;
color: #333;
display: flex;
flex-direction: column;
align-items: center;
padding: 20px;
}
h2 {
margin-bottom: 20px;
color: #005f73;
}
.matrix-container {
display: flex;
justify-content: center;
margin-bottom: 20px;
}
.matrix {
margin: 0 20px;
text-align: center;
}
input[type="number"] {
width: 60px;
padding: 8px;
margin: 5px;
border: 2px solid #005f73;
border-radius: 4px;
font-size: 16px;
transition: border-color 0.3s;
}
input[type="number"]:focus {
border-color: #0a9396;
}
button {
padding: 10px 20px;
font-size: 16px;
color: white;
background-color: #005f73;
border: none;
border-radius: 5px;
cursor: pointer;
transition: background-color 0.3s;
}
button:hover {
background-color: #0a9396;
}
#result {
margin-top: 20px;
display: flex;
justify-content: center;
}
#result table {
border-collapse: collapse;
}
#result td {
border: 1px solid #333;
padding: 15px;
font-size: 18px;
}
</style>
</head>
<body>
<h2>Matrix Addition (2x2)</h2>
<div class="matrix-container">
<div class="matrix">
<h3>Matrix A</h3>
<input type="number" id="a11"> <input type="number" id="a12"><br>
<input type="number" id="a21"> <input type="number" id="a22"><br>
</div>
<div class="matrix">
<h3>Matrix B</h3>
<input type="number" id="b11"> <input type="number" id="b12"><br>
<input type="number" id="b21"> <input type="number" id="b22"><br>
</div>
</div>
<button onclick="addMatrices()">Add Matrices</button>
<h3>Result</h3>
<div id="result"></div>
<script src="matrix.js"></script>
</body>
</html>