#include <iostream>
using namespace std;
class clsMesinKira{
private:
int a,b;
public:
void setData(int p, int q){
a=p;
b=q;
}
void doCampur(void){
cout<<a+b<<endl;
}
void doTolak(void){
cout<<a-b<<endl; //andaikan nilai pertama tolak nilai kedua
}
};
int main() {
clsMesinKira objMesinKira;
objMesinKira.setData(1,2);
objMesinKira.doCampur();
objMesinKira.doTolak();
return 0;
}
I2luY2x1ZGUgPGlvc3RyZWFtPgoKdXNpbmcgbmFtZXNwYWNlIHN0ZDsKCmNsYXNzIGNsc01lc2luS2lyYXsKCXByaXZhdGU6CgkJaW50IGEsYjsKCXB1YmxpYzoKCQl2b2lkIHNldERhdGEoaW50IHAsIGludCBxKXsKCQkJYT1wOwoJCQliPXE7CgkJfQoKCQl2b2lkIGRvQ2FtcHVyKHZvaWQpewoJCQljb3V0PDxhK2I8PGVuZGw7CgkJfQoKCQl2b2lkIGRvVG9sYWsodm9pZCl7CgkJCWNvdXQ8PGEtYjw8ZW5kbDsgLy9hbmRhaWthbiBuaWxhaSBwZXJ0YW1hIHRvbGFrIG5pbGFpIGtlZHVhCgkJfQp9OwoKCgppbnQgbWFpbigpIHsKCWNsc01lc2luS2lyYSBvYmpNZXNpbktpcmE7CglvYmpNZXNpbktpcmEuc2V0RGF0YSgxLDIpOwkKCW9iak1lc2luS2lyYS5kb0NhbXB1cigpOwoJb2JqTWVzaW5LaXJhLmRvVG9sYWsoKTsKCXJldHVybiAwOwp9