In above code i cant display per if i give any condition like if i can i achieve this and at the end of this code not only if statement bt also any document.write function is not working.
<body>
<script>
var math = Math.floor(window.prompt("Enter Math Marks"));
document.write("Math Marks :"+math);
var eng = Math.floor(window.prompt("Enter English Marks"));
document.write("</br>English Marks : "+eng);
var php = Math.floor(window.prompt("Enter PHP Marks"));
document.write("</br> PHP Marks :"+php);
var java = Math.floor(window.prompt("Enter JAVA Marks"));
document.write("</br> JAVA Marks : "+java);
var csharp = Math.floor(window.prompt("Enter C Sharp Marks"));
document.write("</br> C Sharp Marks : "+csharp);
var total = Math.floor(500);
var obt = Math.floor(math + eng + php + java +csharp);
document.write("<br>"+obt);
var per = Math.floor(document.write("<br>Percentage" (obt * 100)/total));
document.write("nothing is dispaling");
if(per<40){
document.write("Fail");
}
</script>
</body>
</html>
More exmples: