JSFiddle - React, Tailwind, and code Playground

by bohdantheone

HTML

<html>
<head>
<script>
function changeResult(result){
  document.getElementById('result').innerHTML = result;
}

function calculateForm(){
  var from=document.getElementById('from').value;
  var to=document.getElementById('to').value;
    /*    var result = (Math.exp(to)+3)*from;
  changeResult(result);
}
</script>
</head>
<body>
<!-- форма -->
<form name="calculator" method="post" >
<input type="text" name="number" id="from" size=20 value="10">
<input type="text" name="number" id="to" size=20 value="20">
</form>
<input type="button" onClick="calculateForm();" value="Розрахувати">
<div id="result"></div>
</body>
</html>

JavaScript

/*
2.var result = (Math.pow(to, 2)-15)/from;
3.var result = (Math.log(5)*Math.pow(to, 3))-Math.pow(from, 2);
4.var result = (Math.log(Math.exp(to))-Math.log(Math.pow(to,2)))*(from-to);
5.var result = (Math.sqrt(Math.pow(to,2))+Math.exp(Math.pow(to,3))/0.5*from;
6.var result = (Math.pow(to, 3)+Math.log(Math.pow(to,2)))/+Math.pow(from,2);
7.var result = (Math.exp(-Max.pow(to, 2)-Max.sqrt(to))/2*Max.pow(from,3);
8.var result = (Math.log(to)+Max.pow(to,2))*Max.pow(from,2);
9.var result = (Math.pow(to, 3)-Max.sqrt(30*to))-Max.pow(from,2);
10.var result = (Math.sqrt(to-1)+Max.pow(to,2))/Max.pow(from,3);
11.var result = (Math.exp(Max.pow(to, 2))+Max.log(Max.sqrt(to)))+2*to*from;
*/