로딩
요청 처리 중입니다...

[c언어][사각형 함수][쉽게풀어쓴c언어 express]

 [c언어][사각형 함수][쉽게풀어쓴c언어 express]

#include struct point { int x, y; }; struct rectangle { struct point a, b; //a는 오른쪽 상단 b 는 왼쪽 하단 }; int area(struct rectangle r) { //a의 x값이랑 b의 x값이랑 빼서 가로길이 찾기 int low, high,result; low = r.a.x - r.b.x; high = r.a.y - r.b.y; result = low*high; return result; } int parimeter(struct rectangle r) { int low, high, result; low = r.a.x - r.b.x; high = r.a.y - r.b.y; result = 2 * (low + high); if (result > 0) return result; else return -result; } int is_square(struct rectangle r) { int low, h...