<!DOCTYPE html>
<html>
<body>
<script>
var money = prompt("Enter the money your pocket");
money=parseInt(money);
if (money>50) document.write("Travel by Auto to reach the school");
else if ((money<=50)&&(money>20)) document.write("Travel by Sharing an Auto to reach the school");
else if ((money<=20)&& (money>5)) document.write("Travel by public bus reach the school");
else document.write("Travel by foot to reach the school");
</script>
</body>
</html>
<html>
<body>
<script>
var money = prompt("Enter the money your pocket");
money=parseInt(money);
if (money>50) document.write("Travel by Auto to reach the school");
else if ((money<=50)&&(money>20)) document.write("Travel by Sharing an Auto to reach the school");
else if ((money<=20)&& (money>5)) document.write("Travel by public bus reach the school");
else document.write("Travel by foot to reach the school");
</script>
</body>
</html>
No comments:
Post a Comment