Calculator Tools Calculator Tools

Tentukan Daerah Penyelesaian Pertidaksamaan Linear

Oct 26, 2023

About this app

Tentukan daerah penyelesaian dari pertidaksamaian linear a𝑥 + 4𝑦 > 12 and 𝑥 + 3𝑦 ≤ a

Tentukan Daerah Penyelesaian Pertidaksamaan Linear Tentukan Daerah Penyelesaian Pertidaksamaan Linear Masukkan satu atau dua angka terakhir dari NIM: Hitung

Put this on your site

Source

                    <html>
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width,initial-scale=1">

<title>Tentukan Daerah Penyelesaian Pertidaksamaan Linear</title>
<meta name="description" content="Tentukan daerah penyelesaian dari pertidaksamaian linear a𝑥 + 4𝑦 > 12 and 𝑥 + 3𝑦 ≤ a">
<meta name="keywords" content="pertidaksamaan linear, daerah penyelesaian, inequality, x, y">

<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.6.0/jquery.min.js"></script>
<link href="https://cdn.jsdelivr.net/npm/bootstrap@5.0.2/dist/css/bootstrap.min.css" rel="stylesheet"
integrity="sha384-EVSTQN3/azprG1Anm3QDgpJLIm9Nao0Yz1ztcQTwFspd3yD65VohhpuuCOmLASjC" crossorigin="anonymous">
<link href="https://stackpath.bootstrapcdn.com/font-awesome/4.7.0/css/font-awesome.min.css" rel="stylesheet">

<script type="text/javascript">
try {
// App Javascript Goes Here. Place your entire script content inside the try block for error handling.

// This will run when the DOM is ready.
document.addEventListener("DOMContentLoaded", function() {
// Get the value of a from the user
let a = prompt("Masukkan nilai a (satu atau dua angka terakhir dari NIM):");

// Convert a to a number
a = parseInt(a);

// Check if a is a valid number
if (isNaN(a)) {
alert("Masukkan nilai a yang valid!");
return;
}

// Calculate the region of solution
let region = "";
if (a >= 0 && a <= 9) {
region = "Daerah Penyelesaian: Semua titik (x, y) yang memenuhi a𝑥 + 4𝑦 > 12 dan 𝑥 + 3𝑦 ≤ " + a;
} else {
region = "Tidak ada daerah penyelesaian yang valid untuk nilai a yang diberikan.";
}

// Display the region of solution
$("#region").text(region);
});

} catch (error) {
// This will throw the error to the parent window.
throw error;
}
</script>

<style>
/* App CSS Goes Here */
body {
background-color: #f8f9fa;
color: #333333;
font-family: 'Arial', sans-serif;
margin: 0;
padding: 0;
}

.container {
max-width: 600px;
margin: 0 auto;
padding: 20px;
}

h1 {
margin-top: 0;
margin-bottom: 20px;
font-size: 24px;
font-weight: bold;
text-align: center;
}

p {
margin-bottom: 20px;
line-height: 1.5;
}

#region {
font-size: 18px;
font-weight: bold;
text-align: center;
}
</style>
</head>
<body>
<div id="main-container" class="container">
<h1>Tentukan Daerah Penyelesaian Pertidaksamaan Linear</h1>

<p>Masukkan satu atau dua angka terakhir dari NIM:</p>

<input type="text" id="a-input" class="form-control mb-3" placeholder="Nilai a">

<button id="calculate-btn" class="btn btn-primary">Hitung</button>

<p id="region"></p>
</div>

<script type="text/javascript">
// This will run when the DOM is ready.
document.addEventListener("DOMContentLoaded", function() {
// Add click event listener to the calculate button
document.getElementById("calculate-btn").addEventListener("click", function() {
// Get the value of a from the input field
let a = document.getElementById("a-input").value;

// Convert a to a number
a = parseInt(a);

// Check if a is a valid number
if (isNaN(a)) {
alert("Masukkan nilai a yang valid!");
return;
}

// Calculate the region of solution
let region = "";
if (a >= 0 && a <= 9) {
region = "Daerah Penyelesaian: Semua titik (x, y) yang memenuhi a𝑥 + 4𝑦 > 12 dan 𝑥 + 3𝑦 ≤ " + a;
} else {
region = "Tidak ada daerah penyelesaian yang valid untuk nilai a yang diberikan.";
}

// Display the region of solution
document.getElementById("region").innerText = region;
});
});
</script>
</body>
</html>