Visual Basic Calculator

Status
Not open for further replies.

dawizhacker

Daemon Poster
Messages
928
I need a the code for a very basic calculator or how to make one.

Must include: Clear + - / * = 1-9 and 0.

A link or the code would be nice. :)
 
Lol who said it's homework?
I quess it's quite easy to make it myself but I'm just way, way to **** lazy.
 
Well, what you could do is create four functions for each mathematical operator (multiplication, addition, subtraction, division) which takes in two integers (or doubles, floats, whatever you need to calculate).

The user will enter the first number and click on a mathematical operator. When that operator is clicked you will know which function to use. The user will enter the second number and click on either another operator or the equals button. At this point you will pass the two numbers to the pertinent function and return the result to the user.

Easy as pi.

PS: This is a very common homework question, so don't expect anybody to give you any code.
 
Status
Not open for further replies.
Back
Top Bottom