Bad Adder
<script>
//Adder
//Julio Maravilla
//September 19 2007
var meal;
var tip=meal * .15;
var total = meal + tip;
alert("This program demonstrates the importance of evaluating the tags. So dont worry, it does a miscalculation on purpose");
meal= prompt("How much was the meal?");
var tip= meal * .15;
var total= meal + tip;
alert ("The meal is $" + meal);
alert ("the tip is $" + tip);
alert ("Total bill: $" +total);
</script> |