<html>
<head>
</head>
<title>JavaScript</title>
<script type="text/javascript">
document.write("Latihan Memancing");
document.write("<h2>Hellooo</h2>");
var a = prompt("Masukkan Nilai A Disini");
var b = prompt("Masukkan Nilai B Disini");
var tambah;
var kurang;
var bagi;
var kali;
tambah=parseInt(a)+parseInt(b);
kurang=parseInt(a)-parseInt(b);
bagi=parseInt(a)/parseInt(b);
kali=parseInt(a)*parseInt(b);
document.write(+a+"+"+b+"="+tambah);
document.write("<br>");
document.write(+a+"-"+b+"="+kurang);
document.write("<br>");
document.write(+a+"/"+b+"="+bagi);
document.write("<br>");
document.write(+a+"*"+b+"="+kali);
document.write("<br>");
</script>
<body>
</body
</html>
<head>
</head>
<title>JavaScript</title>
<script type="text/javascript">
document.write("Latihan Memancing");
document.write("<h2>Hellooo</h2>");
var a = prompt("Masukkan Nilai A Disini");
var b = prompt("Masukkan Nilai B Disini");
var tambah;
var kurang;
var bagi;
var kali;
tambah=parseInt(a)+parseInt(b);
kurang=parseInt(a)-parseInt(b);
bagi=parseInt(a)/parseInt(b);
kali=parseInt(a)*parseInt(b);
document.write(+a+"+"+b+"="+tambah);
document.write("<br>");
document.write(+a+"-"+b+"="+kurang);
document.write("<br>");
document.write(+a+"/"+b+"="+bagi);
document.write("<br>");
document.write(+a+"*"+b+"="+kali);
document.write("<br>");
</script>
<body>
</body
</html>
Tidak ada komentar:
Posting Komentar