Question
Construct a calculator that accepts only INTEGER numbers, one digit at a time. The calculator will be able to add, subtract, divide and multiple any
Construct a calculator that accepts only INTEGER numbers, one digit at a time. The calculator will be able to add, subtract, divide and multiple any two integer numbers. In addition, the special buttons will compute the square root, the square an integer number, and a factorial. (Factorial: 4! = 4 x 3 x 2 x 1 =24)
Clear Display Clears only the number just entered in the display.
Clear All Clears all values in the current calculation and is ready to start a new calculation.
Function Create a Function in a separate Module to process the buttons for 0 to 9. The number in the display is computed in the program and placed in the display. This is accomplished by multiplying the display number by 10 and adding the new number based on the button selected. (Required a FUNCTION in a separate Module). Remember that 423 = (4 x 100) + (2 x 10) + (3 x 1).
Subroutine Use the Module with a Subroutine for the two number calculations that stores the value of the first numbers for +, -, x and / operations and sets up for the second number.
Equal (=) Button For the two number calculations, the equal button (=) computes the value of the two numbers for +, -, x and /. This requires that the SELECT statement be used.
Factorial Use a DO LOOP or FOR Statement to compute the Factorial.
VB Function Use the VB function to compute the Square Root for its button.
Display |
1 |
2 |
4 |
90 |
0 |
8 |
7 |
6 |
3 |
5 |
Clear Display |
+ |
X |
/ |
- |
Sq Rt |
Sqrd |
X ! |
= |
Clear ALL |
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started