<!DOCTYPE html>
<html>
<head>
<title>Octal to Text Converter</title>
<style>
body {
font-family: Arial, sans-serif;
}
textarea {
width: 100%;
height: 100px;
padding: 10px;
font-size: 16px;
}
button {
padding: 10px 20px;
font-size: 16px;
background-color: #4CAF50;
color: #fff;
border: none;
cursor: pointer;
}
button:hover {
background-color: #3e8e41;
}
</style>
</head>
<body>
<h1>Octal to Text Converter</h1>
<textarea id="octal-input" placeholder="Enter octal code (e.g., 110 145 154 154 157)"></textarea>
<button onclick="convertOctalToText()">Convert</button>
<p id="text-output"></p>
<script>
function convertOctalToText() {
const octalInput = document.getElementById('octal-input').value;
const octalArray = octalInput.split(' ');
let textOutput = '';
for (let i = 0; i < octalArray.length; i++) {
const decimal = parseInt(octalArray[i], 8);
textOutput += String.fromCharCode(decimal);
}
document.getElementById('text-output').innerText = textOutput;
}
</script>
</body>
</html>