Logo Welcome to my page
Home Javascript Actionscript Blog
Chapter 1 Programs

 <script>
//subtract two numbers
//Gabriela Torres 9/27

var num1 = 0;
var num2 = 0;
var total = 0;

alert ( " This program will subtract two numbers of your choosing" );

var num1 = prompt( "Enter first number" );
num1=eval(num1);
var num2 = prompt( "Enter second number" );
num2=eval(num2)

total = num1 - num2;

alert (total);

</script>

 

Contact Me

Mr. Styner's Webpage

Clasmates