JSFiddle - React, Tailwind, and code Playground

HTML

<!doctype html>
<html>
<head>
<meta charset="utf-8">
<title>Başlıksız Belge</title>
<script>
         var s1 = parseInt(document.getElementById('sayi1').value);
         var s2 = parseInt(document.getElementById('sayi2').value);
    
    
        function toplam() {

            document.getElementById('sonuc').value = s1 + s2;
        }
        function cikartma() {

            document.getElementById('sonuc').value = s1 - s2;
        }
        function carpma() {

            document.getElementById('sonuc').value = s1 * s2;
        }
        function bolme() {
 
            document.getElementById('sonuc').value = s1 / s2;
        }

</script>
</head>

<body>

<input type="text" id="sayi1" /> <input type="text" id="sayi2" />
<br />
<input type="button" value="+" id="topla" onclick="toplam()" />
<input type="button" value="-" id="fark" onclick="cikartma()" />
<input type="button" value="*" id="carp" onclick="carpma()" />
<input type="button" value="/" id="bol" onclick="bolme()" /><br />
Sonuç<br /><input type="text" id="sonuc" />








</body>
</html>