c++问题: 定义一个名为rectangle的矩形类,其属性数据为矩形左上角和右下角的点的坐标,能计算矩形的面积
c++问题: 定义一个名为rectangle的矩形类,其属性数据为矩形左上角和右下角的点的坐标,能计算矩形的面积
要整个程序,
要整个程序,
其他人气:458 ℃时间:2020-02-05 11:38:50
优质解答
#includestruct point{float x,y;};double area(point p1,point p2){double a;a=sqrt((p2.x-p1.x)*(p2.x-p1.x)*(p2.y-p1.y)*(p2.y-p1.y));return a;}void main (){double s;point p1,p2;coutp1.x>>p1.y>>p2.x>>p2.y;...
我来回答
类似推荐
猜你喜欢
- 1I like fruit. And I don`t like grapes哪里错了
- 2两盏灯L1和L2组成的串联电路,闭合开关发现两只灯泡都不亮,在确认电源及接线都完好的情况下,试
- 3one third of the students( )from( ) A.is;the north B.is;north C.are;the north D.are;north
- 4用“弥留之际”造句
- 5从 6 种不同的儿童玩具中选出 4 种放入 4 个不同的盒子中,每个盒子中放一种玩具
- 6非洲丛林和热带雨林各有什么比较有代表性的象征?例如什么花、动物或事物、物品什么的.
- 7i am getting on well with it这个句子变成特殊疑问句,应该是
- 8四分之三加六分之一等于?
- 9英语翻译
- 1020个相同的球分给3个人,允许有人可以不取,但必须分完,有_____种分法.