Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- class Calculator
- {
- private:
- int value=0;
- public;
- int getValue(){
- return value;
- }
- void multiply(int a){
- value*=a;
- }
- void divide(int bottom){
- value=value/bottom;
- }
- void add(int a);{
- value+=a;
- }
- void subtract(int second){
- value=value-second;
- }
- };
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement