class FourCal:
def setdata(self, first, second):
self.first = first
self.second = second
def add(self):
result = self.first + self.second
return result
def mul(self):
result = self.first * self.second
return result
def sub(self):
result = self.first - self.second
return result
def div(self):
result = self.first / self.second
return result
'C++ > c++수업' 카테고리의 다른 글
char string (0) | 2020.10.13 |
---|---|
cout cin (0) | 2020.10.13 |
<iostream> cout << (0) | 2020.10.13 |
volatile , type qualifiers(한정자) (0) | 2020.09.03 |
반지름입력받기 /원면적구하기 (0) | 2020.07.30 |