I would like to auto calculate a price + commission (12%) and automatically input the result. For example: 100$ + 12% commission = 112$. Problem is here my result is 10012.
Where did I write wrong my code:
<input type="value" class="form-control" id="input">
<input type="value" id="output" onkeyup="calc();"/>
<input id="finalprice" onkeyup="calc();"/>
<script>
function calc() {
  var a = document.getElementById("input").value;
  var b = (12/100) ;
  var c = b * 100;
  var e = a + c;
  var f = a + e;
  document.getElementById("output").value = c;
  document.getElementById("finalprice").value = f;
}
</script>
 
     
     
     
     
    