把交叉点的坐标求出来即可. #define max(a,b) ( (a)>(b)?(a):(b) ) #define min(a,b) ( (a)<(b)?(a):(b) ) int computeArea(int A, int B, int C, int D, int E, int F, int G, int H) { int downx,downy,upx,upy; int crossArea; int all; downx=max(A,E); downy=max(B,F); upx =m…