Make your own free website on Tripod.com
Hello

Welcome to my page!

Javascript

 
Links

Code

<script>
//Adder and subtrator and more
//Julio Maravilla
//September 18, 2007

var one;
var two;
var add;
var subtract;
var multiply;
var divide;

//alerts
alert("You are going to give me two numbers and I will do various calculations with them!");

//gets two numbers
one= prompt("Pick your first number");
two= prompt("Pick your second number");

one=eval(one);
two=eval(two);

//adds

add= one + two;
subtract= one - two;
multiply= one * two;
divide= one / two;

//alerts

alert("addition : " + add);
alert("Subtraction : " + subtract);
alert("Multiplication : " + multiply);
alert("Division : " + divide);

</script>

 

Links

Contact me

Favorite links

Computer Science

Five Classmates