typedef struct
{
int savings;
int loan;
} PROP;
int calcProperty(int, int);
int main(void)
{
int hong_prop;
PROP hong = {10000000, 4000000};
hong_prop = calcProperty(hong.savings, hong.loan); // 구조체의 멤버 변수를 함수의 인수로 전달함
printf("홍길동의 재산은 적금 %d원에 대출 %d원을 제외한 총 %d원입니다.\n", hong.savings, hong.loan, hong_prop);
return 0;
}
int calcProperty(int s, int l)
{
return (s - l);
}