JSFiddle - React, Tailwind, and code Playground
HTML
<form id="calculator">
<p>
<input type="text" id="no1" placeholder="Broj 1" />
</p>
<p>
<input type="text" id="no2" placeholder="Broj 2" />
</p>
</form>
<div id="result"></div>
JavaScript
$(function() {
$('input').on('input', function(){
var no1 = $('#no1').val();
var no2 = $('#no2').val();
var c = 1; // konstanta koju ti odredjujes
if(no1.length && no2.length){
var res = no1 * c / no2;
$('#result').html(res);
}
});
});