#include<stdio.h>
struct point{
int x;
int y;
};
struct rectangle{
struct point upper_left;
struct point lower_right;
};
int main(){
int s,a,b;
struct rectangle c, d;
a=c.lower_right.x-c.upper_left.x;
b=d.upper_left.y-d.lower_right.y;
s=a*b;
printf("r的面积是%d",s);
return 0;
}
【c语言】结构体 求平面直角坐标系中矩形的面积
最新推荐文章于 2022-05-18 20:55:59 发布