7
Answers

How to create a simple calculator

Joe Wilson

Joe Wilson

10y
1.4k
1
use a form and a text box in it to show the entered number and use 15 buttons to create numbers and (+,-,/,*) in it.
 
                                                                                                    Calculator form
 
 

    Text Box
 
  1
 2 3 *
 4 5 6 /
 7 8 9 -
  0
 C = +
 
 the numbers and signs which have used are buttons of form.
 
Example:
    
 First, When enter a number like 22 means click on 2 two times next, if the user enter one of the (+,-,*,/) wait user to enter second number (like:13)
then,when the user Click on the = button in this case by paying attention to the signs and calculate for example: +  so after calculating  the numbers 22+13 and pushing the = button ,print the result on the text box
Note: If user click on the C button so delete the current number or signs (+,-,*,/).
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
Answers (7)