Wednesday, February 15, 2012

Actionscript 3 - Variables and Concatination

Write a simple program that does the following:

Define a variable called aNumber as a Number and assign the value 5

Define a variable called bNumber as a Number and assign the value 3

Define a variable called sumNumber and assign the sum of aNumber and bNumber

Define a variable called subNumber and assign the vaule of aNumber - bNumber

Define a variable called multNumber and assign the value of aNumber multiplied by bNumber

Define a variable called divNumber and assign the value of aNumber divided by bNumber

Create a trace statement concatinating text and variables to output the following with the correct answer.

A + B = 

 A - B = 

A x B =

A / B =

No comments: