Advertisement
Guest User

Untitled

a guest
Apr 27th, 2017
71
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.34 KB | None | 0 0
  1. class Calculator
  2. {
  3. private:
  4. int value=0;
  5. public;
  6. int getValue(){
  7. return value;
  8.  
  9. }
  10. void multiply(int a){
  11. value*=a;
  12. }
  13. void divide(int bottom){
  14. value=value/bottom;
  15. }
  16. void add(int a);{
  17. value+=a;
  18. }
  19. void subtract(int second){
  20. value=value-second;
  21. }
  22.  
  23. };
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement