Thursday, January 24, 2008

Visual Basic

Nearing the end of our Visual Basic Program section, we ended up making a second version of our Calculator program.
  • For this program we made a number of options to choose from such as,

  • - Exponents

  • - Mod

  • - Multiplication

  • - Division

  • - Integer Division

  • - Addition

  • - Subtraction
This is our second version of our calculator program, for this program we made more buttons compared to our first version. We’ve added the exponential command (optExponentiation), Integer division command (optIntegerDivision), and the Mod command (optModulus). Under each option of our calculator we use the command (dblanswer = dblFirstNumber X dblSecondNumber) with X being the Multiplication, Addition, Subtraction, etc.

We had to clear the values for the options by making each value = False.
optExponentiation.Value = False
optMultiplication.Value = False
optDivision.Value = False
optIntegerDivision.Value = False
optModulusDivision.Value = False
optAddition.Value = False
optSubtraction.Value = False

It’s accustomed to customary place Option Explicit at the beginning, and we also added a Done command button to finish our calculator program.

Now, we will move onto a more complex program; C++

1 comment:

Anonymous said...

Hello. This post is likeable, and your blog is very interesting, congratulations :-). I will add in my blogroll =). If possible gives a last there on my blog, it is about the Computador, I hope you enjoy. The address is http://computador-brasil.blogspot.com. A hug.