Keep updating output with change in Input Value

Right now I have a code set up using a switch statement to get input numbers and do the math based on what option is selected eg: if BTC is selected then it will do certain math to convert.

Now the problem I encounter is I want it to update in my HTML as I change the value but I need to keep changing the option to reload to do math

Is there a way to constantly do the math while I am changing the input value using the switch statement or do I have to rewrite it?

my code:

function Calc(val) {

  sessionStorage.setItem('SelectedItem', val);

  switch (val) {
    case 'BTC':
      {
        out = input.value / 100000000 * 33549;
        output.innerHTML = "$" + " " + out;
        break;
      }
    case 'LTC':
      {
        out = input.value / 100000000 * 134;
        output.innerHTML = "$" + " " + out;
        break;
      }
  }
}
<form name="leftCurrency" method="POST">

  <select name="currenOPT" id="currenOPT" onchange="Calc(this.value);">
    <option name="Currency" value="USD">USD</option>
    <option name="Currency" value="BTC">BTC</option>
    <option name="Currency" value="LTC">LTC</option>
  </select>



  <input type="text" name="CurenInput" id="inpVal" onkeyup='saveValue(this);'>
  <input type="submit" name="submit" value="submit">
</form>

<h1 id="output" onchange="reload()"></h1>

Here is a video of what is the code doing right now:

https://imgur.com/a/clIpl4o

Answer

You could just use onchange on the input as well. In a switch case you don’t need to use {}. By default the .value of an input will be a string. That is where you can use Number to convert a string into an integer.

let select = document.getElementById('currenOPT');
let input = document.getElementById('inpVal');
let output = document.getElementById('output');

function Calc() {
  if (input.value.length === 0) {
    return;
  }

  let out = 0;
  switch (select.value) {
    case 'BTC':
      out = Number(input.value) / 100000000 * 33549;
      output.innerHTML = "$" + " " + out;
      break;
    case 'LTC':
      out = Number(input.value) / 100000000 * 134;
      output.innerHTML = "$" + " " + out;
      break;
  }
}
<form name="leftCurrency" method="POST">

  <select name="currenOPT" id="currenOPT" onchange="Calc()">
    <option name="Currency" value="USD">USD</option>
    <option name="Currency" value="BTC">BTC</option>
    <option name="Currency" value="LTC">LTC</option>
  </select>



  <input type="text" name="CurenInput" id="inpVal" onkeyup="Calc()">
  <input type="submit" name="submit" value="submit">
</form>

<h1 id="output"></h1>