4.22
来源:互联网 发布:卡梅隆安东尼数据 编辑:程序博客网 时间:2024/06/05 11:31
#include<iostream>#include<math.h>using namespace std;class dot{public:dot(int a,int b);void show();friend void dist(dot&,dot&);private:int x;int y;};dot::dot(int a,int b){x=a;y=b;}void dot::show(){cout<<"("<<x<<","<<y<<")"<<endl;}void dist(dot& s1,dot& s2){int t1,t2;t1=s1.x-s2.x;t2=s1.y-s2.y;cout<<"该两点间的距离是"<< sqrt(t1*t1+t2*t2)<<endl;}int main(){dot A(1,3),B(5,8);A.show();B.show();dist(A,B);return 0;}
0 0
- 4.22
- 4.22~
- 4.22
- 4.22
- 4.22
- 4.22
- 4.22
- 4.22
- 4.22
- 4.22
- 4.22
- 4.22
- 4.22
- 4.22
- day41(4.22)
- 作业4.22
- 作业 4.22
- 作业4.22
- Exception in thread "main" java.lang.NoSuchMethodError: org.apache.log4j.Logger.isTraceEnabled()Z
- MySQL与Oracle 差异比较之基本语法
- tinyxml源码学习-hello world
- 闲聊ROOT权限——ROOT权限的前世今生
- Cassandra在Windows上安装及使用方法[转]
- 4.22
- windows service
- 《Java课程实习》日志(周一)
- cmake使用示例与整理总结
- TCP buffer
- php的socket通信
- 集成Paypal相关问题
- 内网穿透神器ngrok支持linux,windows,mac
- 怎么扒JS代码?