Jumat, 16 April 2010

Logic var

#body>
#script>
var angka1=10;
var angka2=4;
document.write("Angka1= ",angka1);
document.write("#br/>");
document.write("Angka2= ",angka2);
document.write("#br/>");
document.write("Hasil Jumlah ",angka1,"+",angka2,"= ",angka1+angka2);
document.write("#br/>");
document.write("Hasil Pengurangan",angka1,"-",angka2,"= ",angka1-angka2);
document.write("#br/>");
document.write("Hasil Kali",angka1,"*",angka2,"= ",angka1*angka2);
document.write("#br/>");
document.write("Hasil bagi",angka1,"/",angka2,"= ",angka1/angka2);
document.write("#br/>");
document.write("Hasil Sisa Bagi ",angka1,"Mod ",angka2,"= ",angka1%angka2);
document.write("#br/>");

#/script>
#/body>