online compiler and debugger for c/c++

code. compile. run. debug. share.
Source Code   
Language
<html lang="en"> <head> <meta charset="UTF-8"> <meta name="viewport" content="width=device-width, initial-scale=1.0"> <title>Document</title> </head> <body> <div class="container"></div> <h1>The Secret Message</h1> <style> body { background-color: black; color: green; } .container { margin: 50px auto; padding: 20px; border: 2px solid green; max-width: 500px; } textarea, input{ width: 100%; background-color: black; color: white; border: 1px solid green; padding: 10px; margin-bottom: 15px; } </style> <label>Secret Message:</label> <textarea name="" id="secretmessage" placeholder="Type Your Message Here"></textarea> <label>Key (Number):</label> <input type="number" name="" id="key" value="1"> <div class="buttons"> <button> Encryption (Hide Message)</button> <button>Decryption (Show Message)</button> </div> <h3>Result:</h3> <div class="output" id="result"></div> </div> <script> function process(isEncrypt) { const text = document.getElementById('secretMessage').value; let key = parseInt(document.getElementById('key').value); let result = ""; if (!isEncrypt) { key = -key; } for (let index = 0; index < text.length; index++) { const element = text[index]; let charCode = text.charCodeAt(index); if (charCode >= 65 && charCode >= 90) { result += String.fromCharCode( ((charCode - 65 + key) % 26 + 26) % 26 + 65 ) } else if (charCode >= 97 && charCode <= 122) { result += String.fromCharCode( ((charCode - 97 + key) % 26 + 26) % 26 + 97 ) } else { result += text[index]; } document.getElementById('result').innerText = result; } </script> </body> </html>

Compiling Program...

Command line arguments:
Standard Input: Interactive Console Text

                

                

Program is not being debugged. Click "Debug" button to start program in debug mode.

#FunctionFile:Line
VariableValue
RegisterValue
ExpressionValue